pub trait ShellEnvironment: Send + Sync {
// Required methods
fn shell_exec(&self, script: &str) -> Result<()>;
fn shell_exec_stdout(&self, script: &str) -> Result<String>;
fn shell_exec_visible(&self, script: &str) -> Result<()>;
fn log_info(&self, msg: &str);
fn log_success(&self, msg: &str);
// Provided methods
fn log_warn(&self, _msg: &str) { ... }
fn shell_exec_capture(&self, script: &str) -> Result<(String, String)> { ... }
}Expand description
Minimal shell execution abstraction used by dev-mode builds.
This trait provides just shell execution and logging — enough for
dev_build() which runs nix build directly in the Lima VM.
Required Methods§
Sourcefn shell_exec(&self, script: &str) -> Result<()>
fn shell_exec(&self, script: &str) -> Result<()>
Execute a shell script in the VM.
Sourcefn shell_exec_stdout(&self, script: &str) -> Result<String>
fn shell_exec_stdout(&self, script: &str) -> Result<String>
Execute a shell script in the VM and capture stdout.
Sourcefn shell_exec_visible(&self, script: &str) -> Result<()>
fn shell_exec_visible(&self, script: &str) -> Result<()>
Execute a shell script with visible output.
Sourcefn log_success(&self, msg: &str)
fn log_success(&self, msg: &str)
Log a success message.
Provided Methods§
Sourcefn shell_exec_capture(&self, script: &str) -> Result<(String, String)>
fn shell_exec_capture(&self, script: &str) -> Result<(String, String)>
Execute a shell script, capturing both stdout and stderr.
Returns (stdout, stderr) on success. On failure, returns the exit code and
captured stderr in the error. Used by the build pipeline to capture nix build
errors for structured reporting.
Default: falls back to shell_exec_stdout (stderr not captured).