Skip to content

Commit

Permalink
bail when ask is rejected
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeidnx authored and viperML committed Aug 26, 2024
1 parent 6eb50ad commit a922ead
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl NHRunnable for interface::CleanMode {
if args.ask {
info!("Confirm the cleanup plan?");
if !dialoguer::Confirm::new().default(false).interact()? {
return Ok(());
bail!("User rejected the cleanup plan");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl HomeRebuildArgs {
let confirmation = dialoguer::Confirm::new().default(false).interact()?;

if !confirmation {
return Ok(());
bail!("User rejected the new config");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/nixos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl OsRebuildArgs {
let confirmation = dialoguer::Confirm::new().default(false).interact()?;

if !confirmation {
return Ok(());
bail!("User rejected the new config");
}
}

Expand Down

0 comments on commit a922ead

Please sign in to comment.