Merge 4aeb9b4c19 into sapling-pr-archive-bolinfest

This commit is contained in:
Michael Bolin
2026-02-24 09:46:24 -08:00
committed by GitHub
2 changed files with 4 additions and 6 deletions
@@ -42,7 +42,6 @@ impl ShellPolicyFactory {
/// Public only because it is the associated `Policy` type in the public
/// `EscalationPolicyFactory` impl for `ShellPolicyFactory`.
#[doc(hidden)]
pub struct ShellEscalationPolicy {
provider: Arc<dyn ShellActionProvider>,
stopwatch: Stopwatch,
@@ -45,7 +45,7 @@ pub trait ShellCommandExecutor: Send + Sync {
#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct ExecParams {
/// The bash string to execute.
/// The the string of Zsh/shell to execute.
pub command: String,
/// The working directory to execute the command in. Must be an absolute path.
pub workdir: String,
@@ -66,15 +66,14 @@ pub struct ExecResult {
pub timed_out: bool,
}
#[allow(clippy::module_name_repetitions)]
pub struct EscalateServer {
struct EscalateServer {
bash_path: PathBuf,
execve_wrapper: PathBuf,
policy: Arc<dyn EscalationPolicy>,
}
impl EscalateServer {
pub fn new<P>(bash_path: PathBuf, execve_wrapper: PathBuf, policy: P) -> Self
fn new<P>(bash_path: PathBuf, execve_wrapper: PathBuf, policy: P) -> Self
where
P: EscalationPolicy + Send + Sync + 'static,
{
@@ -85,7 +84,7 @@ impl EscalateServer {
}
}
pub async fn exec(
async fn exec(
&self,
params: ExecParams,
cancel_rx: CancellationToken,