mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
Actually assert that things return successfully
This commit is contained in:
parent
52adc63581
commit
0c0e9e7165
|
@ -61,20 +61,20 @@ pub fn release(matches: &clap::ArgMatches) -> Result<(), Error> {
|
|||
directory_name.to_string_lossy()
|
||||
);
|
||||
|
||||
Command::new("cargo")
|
||||
assert!(Command::new("cargo")
|
||||
.arg("update")
|
||||
.current_dir(directory_name)
|
||||
.output()
|
||||
.map_err(|_| Error::CargoUpdateFailed)?;
|
||||
.status()
|
||||
.map_err(|_| Error::CargoUpdateFailed)?
|
||||
.success());
|
||||
}
|
||||
|
||||
Command::new("just")
|
||||
assert!(Command::new("just")
|
||||
.arg("ci")
|
||||
.current_dir(&root_directory)
|
||||
.spawn()
|
||||
.status()
|
||||
.map_err(|_| Error::JustCiFailed)?
|
||||
.wait()
|
||||
.map_err(|_| Error::JustCiFailed)?;
|
||||
.success());
|
||||
|
||||
if !dry_run {
|
||||
execute_git_command(
|
||||
|
@ -166,6 +166,8 @@ fn execute_git_command(root_directory: &Path, args: &[&str]) -> Result<String, E
|
|||
.output()
|
||||
.map_err(|_| Error::Git("Failed to run command"))?;
|
||||
|
||||
assert!(git_cmd.status.success());
|
||||
|
||||
String::from_utf8(git_cmd.stdout).map_err(|_| Error::Git("Output not utf-8"))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue