-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(install): Add
PIXI_NO_PATH_UPDATE
for PATH update suppression (#…
…692) Close #686 The PR mainly adds the option of using a `PIXI_NO_PATH_UPDATE` environment variable to suppress PATH update, when installing pixi from install script. Besides the option added, since the PR is about environment variable, the way of updating PATH in the PowerShell install script has also been modified from using `[Environment]::SetEnvironmentVariable` to set environment variable to get and update environment variable from Windows registry. This change doesn't affect pixi installation directly and is primarily to address a potential issue that `SetEnvironmentVariable` expands all environment variables and this behavior may not be welcomed in some cases. ```pwsh $Env:PATH #> %USERPROFILE%\bin; # when using `SetEnvironmentVariable` to update PATH, `%USERPROFILE%` will be expanded #> C:\Users\userA\bin;C:\pixi\bin # when using registry to update PATH, `%USERPROFILE%` will be kept unexpanded #> %USERPROFILE%\bin;C:\pixi\bin ``` Related code are copied from [ScoopInstaller/Install](https://github.com/ScoopInstaller/Install/blob/master/install.ps1#L362) I'm maintaining. Signed-off-by: Chawye Hsu <[email protected]>
- Loading branch information
Showing
2 changed files
with
99 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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