-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add environment variable to disable progress output (#8600)
The changes in this commit introduce the `UV_NO_PROGRESS` environment variable as an alternative way to control progress output suppression in uv-cli, equivalent to using the `--no-progress` flag. This enhancement simplifies configuration in CI environments and automated scripts by eliminating the need to detect whether the script is running in a CI environment. Previously, disabling progress output required either passing the `--no-progress` flag directly or implementing script logic to detect CI environments and conditionally add the flag. With this change, users can now simply set `UV_NO_PROGRESS=true` in their environment to achieve the same effect. The changes include: - Adding the `UV_NO_PROGRESS` environment variable to the `EnvVars` struct in `crates/uv-static/src/env_vars.rs`. - Updating the `GlobalArgs` struct in `crates/uv-cli/src/lib.rs` to include a new `no_progress` field that is bound to the `UV_NO_PROGRESS` environment variable. - Adding documentation for the new `UV_NO_PROGRESS` environment variable in `docs/configuration/environment.md`. ## Test Plan After creating a uv project using `uv init` in a temp directory in this project: ``` cargo run cache clean && cargo run venv && UV_NO_PROGRESS=false cargo run sync cargo run cache clean && cargo run venv && cargo run sync ``` produce the expected default behavior ``` cargo run cache clean && cargo run venv && UV_NO_PROGRESS=false cargo run sync ``` produces the same behavior as having the `--no-progress` flag.
- Loading branch information
Showing
5 changed files
with
59 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.