MCPcopy Create free account
hub / github.com/clawshell/clawshell / command_status

Function command_status

src/platform/mod.rs:54–66  ·  view source on GitHub ↗
(command: &mut Command, command_name: &'static str)

Source from the content-addressed store, hash-verified

52}
53
54fn command_status(command: &mut Command, command_name: &'static str) -> Result<(), Error> {
55 let output = command_output(command, command_name)?;
56 if output.status.success() {
57 Ok(())
58 } else {
59 Err(Error::CommandFailed {
60 command: command_name,
61 status: output.status,
62 stdout: String::from_utf8_lossy(&output.stdout).to_string(),
63 stderr: String::from_utf8_lossy(&output.stderr).to_string(),
64 })
65 }
66}
67
68fn format_octal_mode(mode_bits: u32) -> String {
69 format!("{:04o}", mode_bits)

Callers 15

create_system_userFunction · 0.85
delete_system_userFunction · 0.85
service_startFunction · 0.85
service_stopFunction · 0.85
service_restartFunction · 0.85
remove_autostart_serviceFunction · 0.85
set_ownerFunction · 0.85
set_modeFunction · 0.85
create_system_userFunction · 0.85
delete_system_userFunction · 0.85

Calls 1

command_outputFunction · 0.85

Tested by

no test coverage detected