Skip to main content

ShellEnvironment

Trait ShellEnvironment 

Source
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 method
    fn log_warn(&self, _msg: &str) { ... }
}
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§

Source

fn shell_exec(&self, script: &str) -> Result<()>

Execute a shell script in the VM.

Source

fn shell_exec_stdout(&self, script: &str) -> Result<String>

Execute a shell script in the VM and capture stdout.

Source

fn shell_exec_visible(&self, script: &str) -> Result<()>

Execute a shell script with visible output.

Source

fn log_info(&self, msg: &str)

Log an informational message.

Source

fn log_success(&self, msg: &str)

Log a success message.

Provided Methods§

Source

fn log_warn(&self, _msg: &str)

Log a warning (optional; default no-op for test fakes).

Implementors§