optionally disable file locking

This commit is contained in:
CodeMan62 2025-06-01 17:58:19 +05:30
parent 13a86a23b3
commit 184fbca517
3 changed files with 8 additions and 0 deletions

View file

@ -3596,6 +3596,10 @@ pub struct AddArgs {
#[arg(long, env = EnvVars::UV_NO_SYNC, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "frozen")] #[arg(long, env = EnvVars::UV_NO_SYNC, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "frozen")]
pub no_sync: bool, pub no_sync: bool,
/// Disable file locking (flock) operations
#[arg(long, env = EnvVars::UV_UNSAGE_IGNORE_FLOCK, value_parser = clap::builder::BoolishValueParser::new())]
pub unsage_ignore_flock: bool,
/// Assert that the `uv.lock` will remain unchanged. /// Assert that the `uv.lock` will remain unchanged.
/// ///
/// Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, /// Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated,

View file

@ -149,6 +149,9 @@ impl EnvVars {
/// Disable use of uv-managed Python versions. /// Disable use of uv-managed Python versions.
pub const UV_NO_MANAGED_PYTHON: &'static str = "UV_NO_MANAGED_PYTHON"; pub const UV_NO_MANAGED_PYTHON: &'static str = "UV_NO_MANAGED_PYTHON";
/// Disable file locking (flock) operations or ignore
pub const UV_UNSAGE_IGNORE_FLOCK: &'static str = "UV_UNSAGE_IGNORE_FLOCK";
/// Equivalent to the /// Equivalent to the
/// [`python-downloads`](../reference/settings.md#python-downloads) setting and, when disabled, the /// [`python-downloads`](../reference/settings.md#python-downloads) setting and, when disabled, the
/// `--no-python-downloads` option. Whether uv should allow Python downloads. /// `--no-python-downloads` option. Whether uv should allow Python downloads.

View file

@ -1296,6 +1296,7 @@ impl AddSettings {
tag, tag,
branch, branch,
no_sync, no_sync,
unsage_ignore_flock,
locked, locked,
frozen, frozen,
active, active,