From 10732cef68525c3b3fb300be6c4cd9d09cc798f0 Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Tue, 9 May 2023 07:53:36 -0700 Subject: [PATCH] Don't error if already installed with same settings, just warn (#454) --- src/cli/subcommand/install.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli/subcommand/install.rs b/src/cli/subcommand/install.rs index 0e033a0..e80e1cb 100644 --- a/src/cli/subcommand/install.rs +++ b/src/cli/subcommand/install.rs @@ -142,8 +142,8 @@ 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").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").yellow()); + return Ok(ExitCode::SUCCESS) } existing_receipt },