uv/crates/uv-static
Blair Allan 4b61e65d6c
Add UV_NO_SOURCES as an environment variable (#15883)
## Summary

This is an enhancement that makes the cli flag `--no-sources` an
environment variable - "UV_NO_SOURCES"

Why is this a relevant change? 

When working across different environments, in our case remote vs local,
we often have our packages hosted in a artifact registry but when
developing locally we build our packages from github. This results in us
using the uv.tool.sources table quite a bit however this then also
forces us to use `--no-sources` for all our remote work.

This change enables us to set an environment variable once and to never
have to type --no-sources after every uv run command again.

## Test Plan

Expanded on the current --no-sources tests, to test when
UV_NO_SOURCES=true/false the behaviour is the same as the flag.
Additionally ensured that the cli overrides the env variable.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-11-02 20:25:19 +00:00
..
src Add UV_NO_SOURCES as an environment variable (#15883) 2025-11-02 20:25:19 +00:00
Cargo.toml Generate environment variables doc from code (#8493) 2024-11-03 08:31:38 -06:00