Skip to content

Commit

Permalink
Make OpenBSD step less talky and improve verbiage.
Browse files Browse the repository at this point in the history
This commit removes the command flag feedback. This commit also swaps the output "update", for "upgrade", making this step closer to other steps for consistency.
  • Loading branch information
Izder456 committed Oct 17, 2024
1 parent 9885be0 commit 52bafb4
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/steps/os/openbsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,12 @@ pub fn upgrade_openbsd(ctx: &ExecutionContext) -> Result<()> {
let is_current = is_openbsd_current(ctx)?;

if ctx.config().dry_run() {
println!("Would update the OpenBSD system");
if is_current {
println!("Would use -s flag when upgrading system");
}
println!("Would upgrade the OpenBSD system");
return Ok(());
}

let mut args = vec!["/usr/sbin/sysupgrade", "-n"];
if is_current {
println!("OpenBSD is running -current, passing -s flag");
args.push("-s");
}

Expand All @@ -47,10 +43,7 @@ pub fn upgrade_packages(ctx: &ExecutionContext) -> Result<()> {
let is_current = is_openbsd_current(ctx)?;

if ctx.config().dry_run() {
println!("Would update OpenBSD packages");
if is_current {
println!("Would use -Dsnap flag when upgrading packages");
}
println!("Would upgrade OpenBSD packages");
return Ok(());
}

Expand All @@ -63,7 +56,6 @@ pub fn upgrade_packages(ctx: &ExecutionContext) -> Result<()> {

let mut args = vec!["/usr/sbin/pkg_add", "-u"];
if is_current {
println!("OpenBSD is running -current, passing -Dsnap flag");
args.push("-Dsnap");
}

Expand Down

0 comments on commit 52bafb4

Please sign in to comment.