Files
uv/crates/uv-cli
Nicola Spieser Buiss 4e7991058b Fix UV_NO_DEFAULT_GROUPS rejecting truthy values like 1 (#18057)
## Summary

Fixes #18002.

`UV_NO_DEFAULT_GROUPS=1 uv sync` currently fails with:

```
error: invalid value '1' for '--no-default-groups'
  [possible values: true, false]
```

This is because `--no-default-groups` uses clap's default bool parser,
which only accepts `true`/`false`. Meanwhile, `--no-dev` (and
`UV_NO_DEV`) already uses `BoolishValueParser`, which accepts `1`,
`yes`, `on`, `true` (and their negatives).

## Fix

Add `value_parser = clap::builder::BoolishValueParser::new()` to all
four `--no-default-groups` argument definitions (`SyncArgs`, `RunArgs`,
`ExportArgs`, `TreeArgs`), matching the existing pattern used by
`--no-dev`.

## Test Plan

`UV_NO_DEFAULT_GROUPS=1 uv sync` should now succeed instead of erroring.

Co-authored-by: Ocean <ocean@Mac-mini-von-Ocean.local>
2026-02-18 08:47:04 -06:00
..
2026-02-17 21:15:57 +00:00
2026-02-17 21:15:57 +00:00

uv-cli

This crate is an internal component of uv. The Rust API exposed here is unstable and will have frequent breaking changes.

This version (0.0.24) is a component of uv 0.10.4. The source can be found here.

See uv's crate versioning policy for details on versioning.