uv/docs/configuration
Tim Chan 4caa1586fd
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.
2024-10-27 15:14:12 -04:00
..
authentication.md Fix `.netrc` typo in authentication docs (#8521) 2024-10-24 07:58:39 -05:00
environment.md feat: add environment variable to disable progress output (#8600) 2024-10-27 15:14:12 -04:00
files.md Add support for system-level `uv.toml` configuration (#7851) 2024-10-21 17:33:02 +00:00
index.md Add support for named and explicit indexes (#7481) 2024-10-15 18:24:23 -04:00
indexes.md docs: fix typo (#8554) 2024-10-25 09:05:38 -04:00
installer.md Move the installation configuration docs to a separate page (#8546) 2024-10-24 16:04:21 -05:00