From 1d2e8b8fdade3de4d76ffa36a3e84e6c427a8312 Mon Sep 17 00:00:00 2001 From: Billy Doyle <50842911+billy-doyle@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:14:44 -0400 Subject: [PATCH 1/2] feat/uv-tool-exit-0 --- crates/uv/src/commands/tool/install.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/uv/src/commands/tool/install.rs b/crates/uv/src/commands/tool/install.rs index aaa15653539d..8dd5a17c9809 100644 --- a/crates/uv/src/commands/tool/install.rs +++ b/crates/uv/src/commands/tool/install.rs @@ -190,7 +190,7 @@ pub(crate) async fn install( if !force && settings.reinstall.is_none() && settings.upgrade.is_none() { // We're done. writeln!(printer.stderr(), "`{from}` is already installed")?; - return Ok(ExitStatus::Failure); + return Ok(ExitStatus::Success); } } } From 309288a8c36c0a86be402db159e96069fd830f81 Mon Sep 17 00:00:00 2001 From: Billy Doyle <50842911+billy-doyle@users.noreply.github.com> Date: Thu, 11 Jul 2024 00:45:02 -0400 Subject: [PATCH 2/2] modify tests for exit 0 --- crates/uv/tests/tool_install.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/uv/tests/tool_install.rs b/crates/uv/tests/tool_install.rs index 798f500b323c..c3f1f7f9b29c 100644 --- a/crates/uv/tests/tool_install.rs +++ b/crates/uv/tests/tool_install.rs @@ -403,8 +403,8 @@ fn tool_install_already_installed() { .env("UV_TOOL_DIR", tool_dir.as_os_str()) .env("XDG_BIN_HOME", bin_dir.as_os_str()) .env("PATH", bin_dir.as_os_str()), @r###" - success: false - exit_code: 1 + success: true + exit_code: 0 ----- stdout ----- ----- stderr ----- @@ -676,8 +676,8 @@ fn tool_install_entry_point_exists() { .env("UV_TOOL_DIR", tool_dir.as_os_str()) .env("XDG_BIN_HOME", bin_dir.as_os_str()) .env("PATH", bin_dir.as_os_str()), @r###" - success: false - exit_code: 1 + success: true + exit_code: 0 ----- stdout ----- ----- stderr ----- @@ -1407,8 +1407,8 @@ fn tool_install_python_request() { .env("UV_TOOL_DIR", tool_dir.as_os_str()) .env("XDG_BIN_HOME", bin_dir.as_os_str()) .env("PATH", bin_dir.as_os_str()), @r###" - success: false - exit_code: 1 + success: true + exit_code: 0 ----- stdout ----- ----- stderr ----- @@ -1501,8 +1501,8 @@ fn tool_install_preserve_environment() { .env("UV_TOOL_DIR", tool_dir.as_os_str()) .env("XDG_BIN_HOME", bin_dir.as_os_str()) .env("PATH", bin_dir.as_os_str()), @r###" - success: false - exit_code: 1 + success: true + exit_code: 0 ----- stdout ----- ----- stderr -----