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:
committed by
Thomas Schönauer
parent
bd34a3bcd4
commit
e84173be8f
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user