diff --git a/src/executor.rs b/src/executor.rs index a403a65e..b3e16e44 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -176,7 +176,7 @@ impl Executor { /// An extension of `status_checked` that allows you to set a sequence of codes /// that can indicate success of a script - #[cfg_attr(windows, allow(dead_code))] + #[allow(dead_code)] pub fn status_checked_with_codes(&mut self, codes: &[i32]) -> Result<()> { match self { Executor::Wet(c) => c.status_checked_with(|status| { diff --git a/src/steps/os/archlinux.rs b/src/steps/os/archlinux.rs index 6b22d95e..cd8b767a 100644 --- a/src/steps/os/archlinux.rs +++ b/src/steps/os/archlinux.rs @@ -1,7 +1,6 @@ use std::env::var_os; use std::ffi::OsString; use std::path::{Path, PathBuf}; -use std::process::Command; use color_eyre::eyre; use color_eyre::eyre::Result; @@ -32,7 +31,10 @@ pub struct YayParu { impl ArchPackageManager for YayParu { fn upgrade(&self, ctx: &ExecutionContext) -> Result<()> { if ctx.config().show_arch_news() { - Command::new(&self.executable).arg("-Pw").status_checked()?; + ctx.run_type() + .execute(&self.executable) + .arg("-Pw") + .status_checked_with_codes(&[1, 0])?; } let mut command = ctx.run_type().execute(&self.executable);