-
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
"Add installation path to PATH env" function #4008
Comments
What if an installer doesn’t write to |
@Trenly then it will not work, yes. |
I believe this functionality might already exist within the client. |
Winget did install some cli tools to PATH for me, but |
WinGet isn't going to take action to modify environment variables like the path unless it's a portable package where WinGet is logically acting as an installer. There is too much risk of undesired behavior, and if the package is uninstalled, it could lead to dead path entries. It might be worth adding installation notes to manifests for those packages so users can be informed what action they need to take. |
@denelon if it's not going to add to the environment path, at least it can tell what the executable path is so that it can be added to environment path manually! For example, |
@denelon Adding the feature to add the installation to PATH during installation is very important for some portable applications. For example, when I created a manifest file for Dart it had some issues such as the ‘Failed to start the Dart CLI isolate (null)’ error when trying to run it. However, when I manually added the installation path to the system environment PATH, it worked flawlessly. |
Description of the new feature / enhancement
There is some software that install cli version's but do not modify PATH env, it's not realistic to expect that every installer will be updated to modify, therefore having such function in winget will be nice.
Example packages that have cli version's but don't add installation path to PATH env so you can't use them out of the box:
proxinject
7-Zip-zstd
7zip
this issue have many more example of such software #549
Proposed technical implementation details
Example for proxinject package:
AddToPath should only work in Silent or SilentWithProgress modes as user can modify installation path in interactive mode and winget will add wrong path to env.
If user is not specified
--location
argument it will use default value$env:APPDATA\proxinject
otherwise it will add<INSTALLPATH>
toPATH
The text was updated successfully, but these errors were encountered: