mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Add support for .env
and custom env files in uv run
(#8811)
## Summary This PR pulls in https://github.com/astral-sh/uv/pull/8263 and https://github.com/astral-sh/uv/pull/8463, which were originally merged into the v0.5 tracking branch but can now be committed separately, as we've made `.env` loading opt-in. In summary: - `.env` loading is now opt-in (`--env-file .env`). - `.env` remains supported on `uv run`, so it's meant for providing environment variables to the run command, rather than to uv itself. --------- Co-authored-by: Eduardo González Vaquero <47718648+edugzlez@users.noreply.github.com>
This commit is contained in:
parent
224622b089
commit
a42c09fdfb
12 changed files with 326 additions and 3 deletions
|
@ -174,3 +174,5 @@ uv respects the following environment variables:
|
|||
For example, `RUST_LOG=trace` will enable trace-level logging.
|
||||
See the [tracing documentation](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#example-syntax)
|
||||
for more.
|
||||
- <a id="UV_ENV_FILE"></a> [`UV_ENV_FILE`](#UV_ENV_FILE): `.env` files from which to load environment variables when executing `uv run` commands.
|
||||
- <a id="UV_NO_ENV_FILE"></a> [`UV_NO_ENV_FILE`](#UV_NO_ENV_FILE): Ignore `.env` files when executing `uv run` commands.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue