提交 f34f6b14 authored 作者: Serhij S's avatar Serhij S

ignore error 0

上级 8babc14e
......@@ -117,7 +117,9 @@ impl Pipe {
line.trim_end());
}
CommandPipeOutput::Terminated(code) => {
error!(program=%self.program.to_string_lossy(), "Command terminated with code {}", code);
if code != 0 {
error!(program=%self.program.to_string_lossy(), "Command terminated with code {}", code);
}
break;
}
}
......@@ -241,7 +243,7 @@ where
}
});
let mut exit_code = -99;
let mut exit_code = 0;
if let Ok(x) = child.wait().await {
if let Some(code) = x.code() {
exit_code = code;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论