pub struct RealRunner;Expand description
Production runner — spawns a child process via
krypt_platform::process::command, so Windows .cmd / .bat shims
such as scoop spawn.
stdout and stderr are captured (not inherited) and returned in
RunOutcome so callers can include them in reports.
Trait Implementations§
Source§impl Runner for RealRunner
impl Runner for RealRunner
Source§fn run(&self, cmd: &str, args: &[&str]) -> Result<RunOutcome, Error>
fn run(&self, cmd: &str, args: &[&str]) -> Result<RunOutcome, Error>
Run
cmd with args. Returns a RunOutcome on success, or an I/O
error if the process could not be spawned at all.Source§fn run_as_root(&self, cmd: &str, args: &[&str]) -> Result<RunOutcome, Error>
fn run_as_root(&self, cmd: &str, args: &[&str]) -> Result<RunOutcome, Error>
Run
cmd with root privileges: through sudo when it is on PATH,
otherwise directly. Containers and minimal installs often run as root
with no sudo at all; a non-root user without sudo gets the
manager’s own permission error.Auto Trait Implementations§
impl Freeze for RealRunner
impl RefUnwindSafe for RealRunner
impl Send for RealRunner
impl Sync for RealRunner
impl Unpin for RealRunner
impl UnsafeUnpin for RealRunner
impl UnwindSafe for RealRunner
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