mirror of
https://github.com/astral-sh/uv
synced 2026-06-21 13:47:25 +00:00
39f79b3e56
## Summary Adds environment variable support for `--no-install-project`, `--no-install-workspace`, and `--no-install-local` so the flags can be set when uv is invoked through a wrapper that doesn't expose flag pass-through (Pulumi's `pulumi install` is the example in the issue). The new env vars (`UV_NO_INSTALL_PROJECT`, `UV_NO_INSTALL_WORKSPACE`, `UV_NO_INSTALL_LOCAL`) are wired into both `uv sync` and `uv add`, and apply alongside the CLI flag. If the corresponding `--only-install-*` is passed on the CLI, the env var is ignored to keep the existing CLI conflict semantics intact. Closes #19315. ## Test Plan Added integration tests for each of the three flags in `crates/uv/tests/it/sync.rs`, including a check that `--only-install-project` overrides `UV_NO_INSTALL_PROJECT=1`. Also verified manually: ``` $ UV_NO_INSTALL_PROJECT=1 uv sync Installed 1 package in 4ms + packaging==26.2 $ uv sync Installed 2 packages in 5ms + demo==0.1.0 (from file:///tmp/demo) + packaging==26.2 ```
111 lines
2.6 KiB
TOML
111 lines
2.6 KiB
TOML
doc-valid-idents = [
|
|
"PyPI",
|
|
"PubGrub",
|
|
"PyPy",
|
|
"CPython",
|
|
"GraalPy",
|
|
"ReFS",
|
|
"PyTorch",
|
|
"ROCm",
|
|
"XPU",
|
|
"PowerShell",
|
|
"CycloneDX",
|
|
"SemVer",
|
|
"AArch64",
|
|
"UV_DEV",
|
|
"UV_FROZEN",
|
|
"UV_ISOLATED",
|
|
"UV_LOCKED",
|
|
"UV_MANAGED_PYTHON",
|
|
"UV_NATIVE_TLS",
|
|
"UV_SYSTEM_CERTS",
|
|
"UV_NO_DEV",
|
|
"UV_NO_EDITABLE",
|
|
"UV_NO_ENV_FILE",
|
|
"UV_NO_INSTALL_LOCAL",
|
|
"UV_NO_INSTALL_PROJECT",
|
|
"UV_NO_INSTALL_WORKSPACE",
|
|
"UV_NO_INSTALLER_METADATA",
|
|
"UV_NO_MANAGED_PYTHON",
|
|
"UV_NO_PROGRESS",
|
|
"UV_NO_SYNC",
|
|
"UV_OFFLINE",
|
|
"UV_ONLY_INSTALL_LOCAL",
|
|
"UV_ONLY_INSTALL_PROJECT",
|
|
"UV_ONLY_INSTALL_WORKSPACE",
|
|
"UV_PREVIEW",
|
|
"UV_SHOW_RESOLUTION",
|
|
"UV_VENV_CLEAR",
|
|
"UV_VENV_SEED",
|
|
"..", # Include the defaults
|
|
]
|
|
|
|
disallowed-types = [
|
|
"std::fs::DirEntry",
|
|
"std::fs::File",
|
|
"std::fs::OpenOptions",
|
|
"std::fs::ReadDir",
|
|
"tokio::fs::DirBuilder",
|
|
"tokio::fs::DirEntry",
|
|
"tokio::fs::File",
|
|
"tokio::fs::OpenOptions",
|
|
"tokio::fs::ReadDir",
|
|
]
|
|
|
|
disallowed-methods = [
|
|
"dotenvy::dotenv",
|
|
"dotenvy::dotenv_override",
|
|
"dotenvy::from_filename",
|
|
"dotenvy::from_filename_override",
|
|
"dotenvy::from_path",
|
|
"dotenvy::from_path_override",
|
|
"dotenvy::from_read",
|
|
"dotenvy::from_read_override",
|
|
"dotenvy::var",
|
|
"dotenvy::vars",
|
|
"dotenvy::Iter::load",
|
|
"dotenvy::Iter::load_override",
|
|
"std::fs::canonicalize",
|
|
"std::fs::copy",
|
|
"std::fs::create_dir",
|
|
"std::fs::create_dir_all",
|
|
"std::fs::hard_link",
|
|
"std::fs::metadata",
|
|
"std::fs::read",
|
|
"std::fs::read_dir",
|
|
"std::fs::read_link",
|
|
"std::fs::read_to_string",
|
|
"std::fs::remove_dir",
|
|
"std::fs::remove_dir_all",
|
|
"std::fs::remove_file",
|
|
"std::fs::rename",
|
|
"std::fs::set_permissions",
|
|
"std::fs::soft_link",
|
|
"std::fs::symlink_metadata",
|
|
"std::fs::write",
|
|
"tokio::fs::canonicalize",
|
|
"tokio::fs::copy",
|
|
"tokio::fs::create_dir",
|
|
"tokio::fs::create_dir_all",
|
|
"tokio::fs::hard_link",
|
|
"tokio::fs::metadata",
|
|
"tokio::fs::read",
|
|
"tokio::fs::read_dir",
|
|
"tokio::fs::read_link",
|
|
"tokio::fs::read_to_string",
|
|
"tokio::fs::remove_dir",
|
|
"tokio::fs::remove_dir_all",
|
|
"tokio::fs::remove_file",
|
|
"tokio::fs::rename",
|
|
"tokio::fs::set_permissions",
|
|
"tokio::fs::symlink_metadata",
|
|
"tokio::fs::try_exists",
|
|
"tokio::fs::write",
|
|
{ path = "std::os::unix::fs::symlink", allow-invalid = true },
|
|
{ path = "std::os::windows::fs::symlink_dir", allow-invalid = true },
|
|
{ path = "std::os::windows::fs::symlink_file", allow-invalid = true },
|
|
{ path = "tokio::fs::symlink", allow-invalid = true },
|
|
{ path = "tokio::fs::symlink_dir", allow-invalid = true },
|
|
{ path = "tokio::fs::symlink_file", allow-invalid = true },
|
|
]
|