Skip to content

Commit

Permalink
Fix compilation on DragonFly BSD (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
guihkx authored and s34m committed Nov 23, 2022
1 parent 85a4691 commit b440796
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/steps/os/dragonfly.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::command::CommandExt;
use crate::executor::RunType;
use crate::terminal::print_separator;
use crate::utils::require_option;
Expand All @@ -7,18 +8,18 @@ use std::process::Command;

pub fn upgrade_packages(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
let sudo = require_option(sudo, String::from("No sudo detected"))?;
print_separator("DrgaonFly BSD Packages");
print_separator("DragonFly BSD Packages");
run_type
.execute(sudo)
.args(&["/usr/local/sbin/pkg", "upgrade"])
.args(["/usr/local/sbin/pkg", "upgrade"])
.status_checked()
}

pub fn audit_packages(sudo: &Option<PathBuf>) -> Result<()> {
if let Some(sudo) = sudo {
println!();
Command::new(sudo)
.args(&["/usr/local/sbin/pkg", "audit", "-Fr"])
.args(["/usr/local/sbin/pkg", "audit", "-Fr"])
.status_checked()?;
}
Ok(())
Expand Down

0 comments on commit b440796

Please sign in to comment.