Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UV_EXCLUDE_NEWER environment variable #4287

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
12 changes: 6 additions & 6 deletions crates/uv/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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>,
}

Expand Down
Loading