feat: support PIXI_NO_INSTALL environment variable#5919
Open
Shardz4 wants to merge 2 commits intoprefix-dev:mainfrom
Open
feat: support PIXI_NO_INSTALL environment variable#5919Shardz4 wants to merge 2 commits intoprefix-dev:mainfrom
Shardz4 wants to merge 2 commits intoprefix-dev:mainfrom
Conversation
Closes prefix-dev#5837. Adds the PIXI_NO_INSTALL environment variable to control the --no-install flag behavior natively via clap. - Added to NoInstallConfig in crates/pixi_cli/src/cli_config.rs - Handled standalone defaults in update.rs and workspace/platform.rs - Documented feature in docs/workspace/lockfile.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5837.
Description
This PR adds support for the
PIXI_NO_INSTALLenvironment variable to mirror the existing--no-installCLI flag.Previously,
pixisupported setting lockfile configurations through environment variables for--frozen(PIXI_FROZEN) and--locked(PIXI_LOCKED), but did not have an equivalent for--no-install. Users wanting a strictly read-only environment could not configure--no-installvia.envrcalongside the other variables.This change fixes that by tying the
PIXI_NO_INSTALLenv var directly to theclapargument parsing for all commands utilizingno_install.Changes Made:
env = "PIXI_NO_INSTALL"toNoInstallConfigincrates/pixi_cli/src/cli_config.rs.no_installargument inupdate.rs(Args) andworkspace/platform.rs(AddArgsandRemoveArgs).docs/workspace/lockfile.mdto document the newPIXI_NO_INSTALLvariable.Fixes #5837
How Has This Been Tested?
--no-installflag correctly display[env: PIXI_NO_INSTALL=]in their--helpoutput (e.g.,pixi add --help,pixi run --help,pixi workspace platform add --help).PIXI_NO_INSTALL=true pixi add <pkg>and confirmed that while the manifest and lockfile are updated, the environment creation/installation step in.pixi/envs/defaultis successfully bypassed.cargo check -p pixi_cliandcargo test -p pixi_clito ensure there are no regressions or syntax errors.AI Disclosure
Tools: Google Deepmind Antigravity Agent/ Claude Opus 4.6(thinking)
Prompt: