From c336343f8400be2e7e361934a64ccf7bd2ccb0a5 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 17 Oct 2024 19:55:18 -0500 Subject: [PATCH] Remove commands available in the top-level from the suggested subcommand error --- crates/uv/src/lib.rs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/crates/uv/src/lib.rs b/crates/uv/src/lib.rs index 2392b273fc52..0538bed3621f 100644 --- a/crates/uv/src/lib.rs +++ b/crates/uv/src/lib.rs @@ -1530,25 +1530,19 @@ where if let Some(ContextValue::String(subcommand)) = err.get(ContextKind::InvalidSubcommand) { match subcommand.as_str() { - "compile" | "lock" => { + "compile" => { err.insert( ContextKind::SuggestedSubcommand, ContextValue::String("uv pip compile".to_string()), ); } - "sync" => { - err.insert( - ContextKind::SuggestedSubcommand, - ContextValue::String("uv pip sync".to_string()), - ); - } - "install" | "add" => { + "install" => { err.insert( ContextKind::SuggestedSubcommand, ContextValue::String("uv pip install".to_string()), ); } - "uninstall" | "remove" => { + "uninstall" => { err.insert( ContextKind::SuggestedSubcommand, ContextValue::String("uv pip uninstall".to_string()), @@ -1572,12 +1566,6 @@ where ContextValue::String("uv pip show".to_string()), ); } - "tree" => { - err.insert( - ContextKind::SuggestedSubcommand, - ContextValue::String("uv pip tree".to_string()), - ); - } _ => {} } }