pub struct ShellRunner { /* private fields */ }Expand description
Shell runner for executing scripts
Implementations§
Source§impl ShellRunner
impl ShellRunner
Sourcepub fn with_default_shell(shell: Shell) -> Self
pub fn with_default_shell(shell: Shell) -> Self
Create a shell runner with a specific default shell
Sourcepub async fn run_script(
&self,
script: &str,
env: &HashMap<String, String>,
working_dir: &Path,
config: &ShellConfig,
) -> ShellOutput
pub async fn run_script( &self, script: &str, env: &HashMap<String, String>, working_dir: &Path, config: &ShellConfig, ) -> ShellOutput
Execute a script using the default shell
Sourcepub async fn run_bash(
&self,
script: &str,
env: &HashMap<String, String>,
working_dir: &Path,
config: &ShellConfig,
) -> ShellOutput
pub async fn run_bash( &self, script: &str, env: &HashMap<String, String>, working_dir: &Path, config: &ShellConfig, ) -> ShellOutput
Execute a bash script
Sourcepub async fn run_pwsh(
&self,
script: &str,
env: &HashMap<String, String>,
working_dir: &Path,
config: &ShellConfig,
) -> ShellOutput
pub async fn run_pwsh( &self, script: &str, env: &HashMap<String, String>, working_dir: &Path, config: &ShellConfig, ) -> ShellOutput
Execute a PowerShell Core (pwsh) script
Sourcepub async fn run_powershell(
&self,
script: &str,
env: &HashMap<String, String>,
working_dir: &Path,
config: &ShellConfig,
) -> ShellOutput
pub async fn run_powershell( &self, script: &str, env: &HashMap<String, String>, working_dir: &Path, config: &ShellConfig, ) -> ShellOutput
Execute a Windows PowerShell script
Sourcepub async fn run_script_streaming(
&self,
script: &str,
env: &HashMap<String, String>,
working_dir: &Path,
config: &ShellConfig,
on_output: OutputCallback,
) -> ShellOutput
pub async fn run_script_streaming( &self, script: &str, env: &HashMap<String, String>, working_dir: &Path, config: &ShellConfig, on_output: OutputCallback, ) -> ShellOutput
Execute a script with real-time output streaming
Sourcepub fn to_step_result(
&self,
output: ShellOutput,
step_name: Option<String>,
display_name: Option<String>,
fail_on_stderr: bool,
duration: Duration,
) -> StepResult
pub fn to_step_result( &self, output: ShellOutput, step_name: Option<String>, display_name: Option<String>, fail_on_stderr: bool, duration: Duration, ) -> StepResult
Convert shell output to a step result
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShellRunner
impl RefUnwindSafe for ShellRunner
impl Send for ShellRunner
impl Sync for ShellRunner
impl Unpin for ShellRunner
impl UnsafeUnpin for ShellRunner
impl UnwindSafe for ShellRunner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more