hard error `uv version` for more cli flags (#13203)

This commit is contained in:
Aria Desires 2025-04-30 13:39:11 -04:00 committed by GitHub
parent 671d609127
commit f91b4aeb66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -1044,9 +1044,12 @@ async fn run(mut cli: Cli) -> Result<ExitStatus> {
short, short,
output_format, output_format,
}) => { }) => {
// If they specified a project, they probably don't want `uv --version` semantics // If they specified any of these flags, they probably don't mean `uv self version`
let strict = let strict = cli.top_level.global_args.project.is_some()
cli.top_level.global_args.project.is_some() || globals.preview.is_enabled(); || globals.preview.is_enabled()
|| dry_run
|| bump.is_some()
|| value.is_some();
commands::project_version( commands::project_version(
&project_dir, &project_dir,
value, value,