mirror of
https://seed.radicle.dev/rad:z3qg5TKmN83afz2fj9z3fQjU8vaYE.git
synced 2026-11-28 22:10:28 +08:00
fix: if a command fails, fail the CI run
Oops. Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
+7
-1
@@ -234,7 +234,10 @@ fn runcmd(log: &mut LogFile, argv: &[&str], cwd: &Path) -> Result<(), NativeErro
|
||||
error
|
||||
.to_writer(std::io::stdout())
|
||||
.map_err(|e| NativeError::WriteResponse(error.clone(), e))?;
|
||||
return Ok(());
|
||||
return Err(NativeError::CommandFailed(
|
||||
exit.code().unwrap(),
|
||||
argv.iter().map(|s| s.to_string()).collect(),
|
||||
));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@@ -499,4 +502,7 @@ enum NativeError {
|
||||
|
||||
#[error("failed to run command {0:?}")]
|
||||
Command(Vec<String>, #[source] std::io::Error),
|
||||
|
||||
#[error("command failed with exit code {0}: {1:?}")]
|
||||
CommandFailed(i32, Vec<String>),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user