From 2dd40810fb0ee863c875d44e197bda2e4dc2f31d Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Mon, 23 Oct 2023 13:52:42 -0700 Subject: [PATCH] Fix exit code inconsistency (#684) --- src/cli/subcommand/install.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/subcommand/install.rs b/src/cli/subcommand/install.rs index c86b0bb..a72c05b 100644 --- a/src/cli/subcommand/install.rs +++ b/src/cli/subcommand/install.rs @@ -128,8 +128,8 @@ impl CommandExecute for Install { eprintln!("{}", format!("Found existing plan in `{RECEIPT_LOCATION}` which used different planner settings, try uninstalling the existing install with `{uninstall_command}`").red()); return Ok(ExitCode::FAILURE) } - eprintln!("{}", format!("Found existing plan in `{RECEIPT_LOCATION}`, with the same settings, already completed, try uninstalling (`{uninstall_command}`) and reinstalling if Nix isn't working").red()); - return Ok(ExitCode::FAILURE) + eprintln!("{}", format!("Found existing plan in `{RECEIPT_LOCATION}`, with the same settings, already completed. Try uninstalling (`{uninstall_command}`) and reinstalling if Nix isn't working").red()); + return Ok(ExitCode::SUCCESS) }, None => { let res = planner.plan().await; @@ -180,7 +180,7 @@ impl CommandExecute for Install { return Ok(ExitCode::FAILURE) } if existing_receipt.actions.iter().all(|v| v.state == ActionState::Completed) { - eprintln!("{}", format!("Found existing plan in `{RECEIPT_LOCATION}`, with the same settings, already completed, try uninstalling (`{uninstall_command}`) and reinstalling if Nix isn't working").yellow()); + eprintln!("{}", format!("Found existing plan in `{RECEIPT_LOCATION}`, with the same settings, already completed. Try uninstalling (`{uninstall_command}`) and reinstalling if Nix isn't working").yellow()); return Ok(ExitCode::SUCCESS) } existing_receipt