chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.35k stars 903 forks source link

Auto execute refreshenv after install #2458

Open mrx23dot opened 2 years ago

mrx23dot commented 2 years ago

Please auto call refreshenv after new installation.

E.g. on linux after I do apt-get I don't have to do anything to use the newly installed commands.

PATH is already modified after install, there is no point using and old view of PATH in the current console. Majority of people are annoyed by it, for the minority there could be a "disable autorefresh" setting.

pauby commented 2 years ago

Majority of people are annoyed by it

Can you clarify how you know that the 'majority are annoyed by it'?

mrx23dot commented 2 years ago

Programmers who would like to use the installed command right after installing the framework without having to remember a long unique commands or restart the console or worst the PC.

choco install golang
go --version

choco install python
python --version

same as on linux:
apt install python
python3 --version

I never figure it why developers fight user convenience. Would you accept having to turn your TV off/on between changing the channels? Or disconnecting/reconnecting to wifi between sending 2 emails?

pauby commented 2 years ago

I never figure it why developers fight user convenience.

You stated that the majority of users were annoyed by having to type refreshenv. I asked how you knew that.

Development effort has to be balanced. If the majority of people want something, then it's a different balance by 1 person wanting it. So my question was to get an understanding of that. I didn't think that was unreasonable.

As the solution for this is run refreshenv for those packages that need it, as it's always been, I'm trying to understand how it's now a problem that wasn't there before. refreshenv is not required for every package, only those that change things that the OS needs to know about such as environment variables or the path. This isn't a Chocolatey issue, it's an operating system one. Chocolatey has refreshenv as a workaround for that to try and help.

mrx23dot commented 2 years ago

I made a wild guess that people want less extra work to get things done, but we can make some vote on it.

I understand it's a windows limitation, but chocolatey is an os extension to make like easier, so we could take it a bit further. I can't think of any downside automatically doing it, since the change is already done in the os.

It could be at the end of last install, doesn't have to be between installs: choco install python golang

Or if you really don't want to do this then an extra command at the end, but this will still consume user time to look it up: choco install python golang --refreshenv

soredake commented 1 year ago

I agree that calling refreshenv manually is annoying, it should be called automatically after last package is installed.

soredake commented 1 year ago

Similar feature request for winget https://github.com/microsoft/winget-cli/issues/3077