Skip to content

Commit

Permalink
confirmation prompts: abort with unique messages (#1314)
Browse files Browse the repository at this point in the history
* confirmation prompts: abort with unique messages

If an install is attempted, it fails near the end, and an uninstall is declined
by the user, state specifically that an uninstall was not done, don't report
that nothing was done.

Signed-off-by: Nicholas Sielicki <[email protected]>

* fixup: quit message

---------

Signed-off-by: Nicholas Sielicki <[email protected]>
Co-authored-by: Cole Helbling <[email protected]>
  • Loading branch information
sielicki and cole-h authored Nov 25, 2024
1 parent b4bc792 commit 10e6075
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/cli/subcommand/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,10 @@ impl CommandExecute for Install {
PromptChoice::Yes => break,
PromptChoice::Explain => currently_explaining = true,
PromptChoice::No => {
interaction::clean_exit_with_message("Okay, didn't do anything! Bye!").await
interaction::clean_exit_with_message(
"Okay, not continuing with the installation. Bye!",
)
.await
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/cli/subcommand/repair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl CommandExecute for Repair {
PromptChoice::Yes => break,
PromptChoice::No => {
crate::cli::interaction::clean_exit_with_message(
"Okay, didn't do anything! Bye!",
"Okay, not continuing with the repair. Bye!",
)
.await
},
Expand Down
5 changes: 4 additions & 1 deletion src/cli/subcommand/uninstall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ impl CommandExecute for Uninstall {
PromptChoice::Yes => break,
PromptChoice::Explain => currently_explaining = true,
PromptChoice::No => {
interaction::clean_exit_with_message("Okay, didn't do anything! Bye!").await
interaction::clean_exit_with_message(
"Okay, not continuing with the uninstallation. Bye!",
)
.await
},
}
}
Expand Down

0 comments on commit 10e6075

Please sign in to comment.