From f91b4aeb66f167411164ff44ffc23843ea32a5e5 Mon Sep 17 00:00:00 2001 From: Aria Desires Date: Wed, 30 Apr 2025 13:39:11 -0400 Subject: [PATCH] hard error `uv version` for more cli flags (#13203) --- crates/uv/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/uv/src/lib.rs b/crates/uv/src/lib.rs index 281c0e91f..8f8cd525f 100644 --- a/crates/uv/src/lib.rs +++ b/crates/uv/src/lib.rs @@ -1044,9 +1044,12 @@ async fn run(mut cli: Cli) -> Result { short, output_format, }) => { - // If they specified a project, they probably don't want `uv --version` semantics - let strict = - cli.top_level.global_args.project.is_some() || globals.preview.is_enabled(); + // If they specified any of these flags, they probably don't mean `uv self version` + let strict = cli.top_level.global_args.project.is_some() + || globals.preview.is_enabled() + || dry_run + || bump.is_some() + || value.is_some(); commands::project_version( &project_dir, value,