Add CommandExt trait (#146)

* Color CI output

* Improve `CommandExt`

* Add comments explaining `#[allow]`s

* Remove useless `dead_code` annotation

* Improve error messages

* Print errors when running a shell errors

* fixup! Remove useless `dead_code` annotation
This commit is contained in:
Rebecca Turner
2022-11-08 05:54:35 -05:00
committed by Thomas Schönauer
parent bd34a3bcd4
commit e84173be8f
32 changed files with 822 additions and 558 deletions

View File

@@ -11,7 +11,7 @@ pub fn upgrade_packages(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()>
run_type
.execute(sudo)
.args(&["/usr/local/sbin/pkg", "upgrade"])
.check_run()
.status_checked()
}
pub fn audit_packages(sudo: &Option<PathBuf>) -> Result<()> {
@@ -19,8 +19,7 @@ pub fn audit_packages(sudo: &Option<PathBuf>) -> Result<()> {
println!();
Command::new(sudo)
.args(&["/usr/local/sbin/pkg", "audit", "-Fr"])
.spawn()?
.wait()?;
.status_checked()?;
}
Ok(())
}