uv
1cdabfb9 - Group executable install errors during `uv python install` (#19691)

Commit
1 day ago
Group executable install errors during `uv python install` (#19691) Report pre-existing unmanaged executables in a single error instead of one message per executable. ## Summary When `uv python install` links the default executables (`python`, `python3`, `python3.x`) and more than one of them already exists as a file uv doesn't manage, the output currently repeats almost the same error once per executable. The change is in `create_bin_links` (`crates/uv/src/commands/python/install.rs`), which links each executable into the bin directory by looping over a list of targets. Instead of pushing an error for every conflicting executable inside the loop, it now collects them and reports once after the loop: - 0 conflicts: nothing is reported - 1 conflict: the original single-line message (unchanged) - 2+ conflicts: one grouped error with the paths as a bulleted list Other, unrelated failures (e.g. failing to remove or re-link a file) are still reported individually. Resolves #9707 ## Test Plan Added `python_install_multiple_unmanaged_executables`: install the default executables, replace all three (`python`, `python3`, `python3.x`) with unmanaged files, reinstall without `--force`, and assert that a single grouped error is shown and the existing files are left untouched. The existing single-conflict tests (`python_install_force`, `python_install_preview`) still pass, so the one-executable output is unchanged. ```bash cargo nextest run -p uv --test it python_install cargo clippy -p uv --all-targets ```
Author
Parents
Loading