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

View file

@ -1044,9 +1044,12 @@ async fn run(mut cli: Cli) -> Result<ExitStatus> {
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,