mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
improve the explanation of the env var
This commit is contained in:
parent
20d2cd93b7
commit
f4daeafca1
2 changed files with 14 additions and 6 deletions
|
@ -256,9 +256,13 @@ impl EnvVars {
|
|||
/// for more details.
|
||||
pub const UV_PROJECT_ENVIRONMENT: &'static str = "UV_PROJECT_ENVIRONMENT";
|
||||
|
||||
/// Equivalent to the `--active` command line argument. If set, uv will look at `VIRTUAL_ENV`
|
||||
/// and use the active virtual environment, if any. If `VIRTUAL_ENV` is not defined, this has
|
||||
/// no effect.
|
||||
/// Equivalent to the `--active` command line argument for commands that support it. For
|
||||
/// example, when running inside a project or when running a script with inline metadata,
|
||||
/// `uv run` manages its own virtual environment and ignores the caller's active environment
|
||||
/// (i.e. the `VIRTUAL_ENV` environment variable). Similarly, `uv sync` and `uv add` expect to
|
||||
/// run in a project, and they use the managed virtual environment by default. The active
|
||||
/// option causes these commands to use the caller's active virtual environment instead, if
|
||||
/// there is one.
|
||||
pub const UV_USE_ACTIVE_ENVIRONMENT: &'static str = "UV_USE_ACTIVE_ENVIRONMENT";
|
||||
|
||||
/// Specifies the directory to place links to installed, managed Python executables.
|
||||
|
|
|
@ -431,9 +431,13 @@ the installer from modifying shell profiles or environment variables.
|
|||
|
||||
### `UV_USE_ACTIVE_ENVIRONMENT`
|
||||
|
||||
Equivalent to the `--active` command line argument. If set, uv will look at `VIRTUAL_ENV`
|
||||
and use the active virtual environment, if any. If `VIRTUAL_ENV` is not defined, this has
|
||||
no effect.
|
||||
Equivalent to the `--active` command line argument for commands that support it. For
|
||||
example, when running inside a project or when running a script with inline metadata,
|
||||
`uv run` manages its own virtual environment and ignores the caller's active environment
|
||||
(i.e. the `VIRTUAL_ENV` environment variable). Similarly, `uv sync` and `uv add` expect to
|
||||
run in a project, and they use the managed virtual environment by default. The active
|
||||
option causes these commands to use the caller's active virtual environment instead, if
|
||||
there is one.
|
||||
|
||||
### `UV_VENV_SEED`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue