MCPcopy Index your code
hub / github.com/bootc-dev/bootc / ExitStatusExt

Interface ExitStatusExt

crates/utils/src/command.rs:72–84  ·  view source on GitHub ↗

Helpers intended for [`std::process::ExitStatus`].

Source from the content-addressed store, hash-verified

70
71/// Helpers intended for [`std::process::ExitStatus`].
72pub trait ExitStatusExt {
73 /// If the exit status signals it was not successful, return an error.
74 /// Note that we intentionally *don't* include the command string
75 /// in the output; we leave it to the caller to add that if they want,
76 /// as it may be verbose.
77 fn check_status(&mut self) -> Result<()>;
78
79 /// If the exit status signals it was not successful, return an error;
80 /// this also includes the contents of `stderr`.
81 ///
82 /// Otherwise this is the same as [`Self::check_status`].
83 fn check_status_with_stderr(&mut self, stderr: std::fs::File) -> Result<()>;
84}
85
86/// Parse the last chunk (e.g. 1024 bytes) from the provided file,
87/// ensure it's UTF-8, and return that value. This function is infallible;

Callers

nothing calls this directly

Implementers 1

command.rscrates/utils/src/command.rs

Calls

no outgoing calls

Tested by

no test coverage detected