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

[Bug] Environment variables are automatically expanded #5394

Closed
WHYBBE opened this issue Feb 20, 2023 · 2 comments · Fixed by #5424
Closed

[Bug] Environment variables are automatically expanded #5394

WHYBBE opened this issue Feb 20, 2023 · 2 comments · Fixed by #5424
Labels

Comments

@WHYBBE
Copy link
Contributor

WHYBBE commented Feb 20, 2023

Bug Report

The environment variable of "Path" is automatically expanded due to the modification of the environment variable by Scoop.

Current Behavior

  1. Add an item to the user's environment variable: Foo=Bar;
  2. Add %Foo% to the user's "Path" environment variable;
  3. Then Bar can be obtained in the user's "Path" by %Foo%;
  4. Try some installation that can change the user's "Path", such as scoop install Python;
  5. Then %Foo% will be directly expanded to Bar in "Path".

Expected Behavior

%Foo% should not be expanded after Scoop's modification of "Path"

Additional context

Usually environment variable string expansion will not affect anything, especially %USERPROFILE%\AppData\Local\Microsoft\WindowsApps is often modified by Scoop.

But there are too many items in my "Path" environment variable, and I have a problem with "PATH too long installer unable to modify Path".

So I want to use the %% method to nest another custom environment variable to reduce the length of "Path".

Possible Solution

Try the method without expanding the environment variable.(e.g. PowerShell/PowerShell#17518)

System details

  • Windows version: Windows 11 25300
  • OS architecture: amd64
  • PowerShell version: 7.3.2

Scoop Configuration

{
  "last_update": "2023-02-20T12:28:30.9418781+08:00",
  "aria2-warning-enabled": false,
  "scoop_repo": "https://github.com/ScoopInstaller/Scoop",
  "scoop_branch": "master"
}
@WHYBBE
Copy link
Contributor Author

WHYBBE commented Feb 21, 2023

Similar to some issues mentioned in #5059.

@WHYBBE
Copy link
Contributor Author

WHYBBE commented Feb 27, 2023

Solved by #5395.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant