From 10e607502748369ced204c2f87e0b59b7d2b6908 Mon Sep 17 00:00:00 2001 From: Nicholas Sielicki Date: Mon, 25 Nov 2024 08:04:16 -0800 Subject: [PATCH] confirmation prompts: abort with unique messages (#1314) * 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 * fixup: quit message --------- Signed-off-by: Nicholas Sielicki Co-authored-by: Cole Helbling --- src/cli/subcommand/install.rs | 5 ++++- src/cli/subcommand/repair.rs | 2 +- src/cli/subcommand/uninstall.rs | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/cli/subcommand/install.rs b/src/cli/subcommand/install.rs index 9aafb5c79..d28da667f 100644 --- a/src/cli/subcommand/install.rs +++ b/src/cli/subcommand/install.rs @@ -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 }, } } diff --git a/src/cli/subcommand/repair.rs b/src/cli/subcommand/repair.rs index 7548b572b..9642b7064 100644 --- a/src/cli/subcommand/repair.rs +++ b/src/cli/subcommand/repair.rs @@ -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 }, diff --git a/src/cli/subcommand/uninstall.rs b/src/cli/subcommand/uninstall.rs index d6bd50526..13c9f0e76 100644 --- a/src/cli/subcommand/uninstall.rs +++ b/src/cli/subcommand/uninstall.rs @@ -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 }, } }