Description
In src/linux.rs (run_command) and src/macos.rs (invoke_script), the success check requires both output.status.success() and output.stderr.is_empty():
if output.status.success() && output.stderr.is_empty() {
return Ok(());
}
Many system commands legitimately write warnings or informational messages to stderr even when they execute successfully. This causes valid operations to be reported as failures.
Suggested fix
Trust the exit status code alone:
if output.status.success() {
return Ok(());
}
If stderr content is still needed, include it only in the error case:
if output.status.success() {
return Ok(());
}
Err(Error::new(
ErrorKind::Other,
String::from_utf8_lossy(&output.stderr).into_owned(),
))
Description
In
src/linux.rs(run_command) andsrc/macos.rs(invoke_script), the success check requires bothoutput.status.success()andoutput.stderr.is_empty():Many system commands legitimately write warnings or informational messages to stderr even when they execute successfully. This causes valid operations to be reported as failures.
Suggested fix
Trust the exit status code alone:
If stderr content is still needed, include it only in the error case: