mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Add UV_EXCLUDE_NEWER
environment variable (#4287)
## Summary Closes https://github.com/astral-sh/uv/issues/4286.
This commit is contained in:
parent
d963a0f085
commit
c4483017ac
2 changed files with 8 additions and 6 deletions
|
@ -591,6 +591,8 @@ uv accepts the following command-line arguments as environment variables:
|
|||
concurrently at any given time.
|
||||
- `UV_CONCURRENT_INSTALLS`: Used to control the number of threads used when installing and unzipping
|
||||
packages.
|
||||
- `UV_EXCLUDE_NEWER`: Equivalent to the `--exclude-newer` command-line argument. If set, uv will
|
||||
exclude distributions published after the specified date.
|
||||
|
||||
In each case, the corresponding command-line argument takes precedence over an environment variable.
|
||||
|
||||
|
|
|
@ -578,7 +578,7 @@ pub(crate) struct PipCompileArgs {
|
|||
///
|
||||
/// Accepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and UTC dates in the same
|
||||
/// format (e.g., `2006-12-02`).
|
||||
#[arg(long)]
|
||||
#[arg(long, env = "UV_EXCLUDE_NEWER")]
|
||||
pub(crate) exclude_newer: Option<ExcludeNewer>,
|
||||
|
||||
/// Specify a package to omit from the output resolution. Its dependencies will still be
|
||||
|
@ -911,7 +911,7 @@ pub(crate) struct PipSyncArgs {
|
|||
///
|
||||
/// Accepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and UTC dates in the same
|
||||
/// format (e.g., `2006-12-02`).
|
||||
#[arg(long)]
|
||||
#[arg(long, env = "UV_EXCLUDE_NEWER")]
|
||||
pub(crate) exclude_newer: Option<ExcludeNewer>,
|
||||
|
||||
/// Perform a dry run, i.e., don't actually install anything but resolve the dependencies and
|
||||
|
@ -1285,7 +1285,7 @@ pub(crate) struct PipInstallArgs {
|
|||
///
|
||||
/// Accepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and UTC dates in the same
|
||||
/// format (e.g., `2006-12-02`).
|
||||
#[arg(long)]
|
||||
#[arg(long, env = "UV_EXCLUDE_NEWER")]
|
||||
pub(crate) exclude_newer: Option<ExcludeNewer>,
|
||||
|
||||
/// Perform a dry run, i.e., don't actually install anything but resolve the dependencies and
|
||||
|
@ -1722,7 +1722,7 @@ pub(crate) struct VenvArgs {
|
|||
///
|
||||
/// Accepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and UTC dates in the same
|
||||
/// format (e.g., `2006-12-02`).
|
||||
#[arg(long)]
|
||||
#[arg(long, env = "UV_EXCLUDE_NEWER")]
|
||||
pub(crate) exclude_newer: Option<ExcludeNewer>,
|
||||
|
||||
#[command(flatten)]
|
||||
|
@ -1812,7 +1812,7 @@ pub(crate) struct RunArgs {
|
|||
///
|
||||
/// Accepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and UTC dates in the same
|
||||
/// format (e.g., `2006-12-02`).
|
||||
#[arg(long)]
|
||||
#[arg(long, env = "UV_EXCLUDE_NEWER")]
|
||||
pub(crate) exclude_newer: Option<ExcludeNewer>,
|
||||
|
||||
/// Run the command in a different package in the workspace.
|
||||
|
@ -1929,7 +1929,7 @@ pub(crate) struct LockArgs {
|
|||
///
|
||||
/// Accepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and UTC dates in the same
|
||||
/// format (e.g., `2006-12-02`).
|
||||
#[arg(long)]
|
||||
#[arg(long, env = "UV_EXCLUDE_NEWER")]
|
||||
pub(crate) exclude_newer: Option<ExcludeNewer>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue