microsoft / microsoft/winget-cli

Update available environment variables so the user does not need to restart their terminal

Open
#3,077 13 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Path Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

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

winget install --id=CoreyButler.NVMforWindows  -e

Followed by another line in the same script (again, as per the docs):

nvm install latest

Results in:

PS C:\Users\User\AppData\Roaming\nvm> nvm install latest
nvm : The term 'nvm' is not recognized as the name of a cmdlet, function, script file, or operable program.
Proposed technical implementation details

WinGet or Terminal should update the user environment variables in order to unblock automated installations of software

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented winget install followed by nvm install latest sequence in the current terminal and inspect how WinGet or Terminal handles environment variables. Done means environment changes from an installation are available to the current terminal session without closing and reopening it, so the subsequent nvm command succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.