-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Update available environment variables so the user does not need to restart their terminal #3077
Comments
@stephengillie - Area-Path also |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
I had the same problem. This solution seems to work for me. winget install --id=CoreyButler.NVMforWindows -e --silent
$env:NVM_HOME = [System.Environment]::GetEnvironmentVariable("NVM_HOME", "User")
$env:NVM_SYMLINK = [System.Environment]::GetEnvironmentVariable("NVM_SYMLINK", "User")
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
nvm install 18.6.0
nvm use 18.6.0 |
This comment was marked as outdated.
This comment was marked as outdated.
1 similar comment
@lloydjatkinson this issue has been marked as duplicate and has not had any activity for 1 day. It will be closed for housekeeping purposes. |
Totally agree that PATH should be reloaded after installing package so i can use it right away, similar feature request for chocolatey chocolatey/choco#2458 |
We're currently working on the dependency flow: You may also want to take a look at: We're looking at a few scenarios related to the path, and there is discussion and a possible workaround as well as some design work on how we might achieve this. |
@lloydjatkinson, after installing the
|
Description of the new feature / enhancement
Some software that is installed adds itself to the
PATH
environment variable. These changes are not surfaced to the current terminal session and requires the user to close the terminal and open it again. I consider this to be a huge blocker for creating fully automated software installations as the environment variables it added are often needed in the next step.Consider NVM as per the docs here: https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows
Followed by another line in the same script (again, as per the docs):
Results in:
Proposed technical implementation details
WinGet or Terminal should update the user environment variables in order to unblock automated installations of software
The text was updated successfully, but these errors were encountered: