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

Auto execute refreshenv after install #2458

Open
mrx23dot opened this issue Nov 17, 2021 · 6 comments
Open

Auto execute refreshenv after install #2458

mrx23dot opened this issue Nov 17, 2021 · 6 comments

Comments

@mrx23dot
Copy link

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
Copy link
Member

pauby commented Nov 17, 2021

Majority of people are annoyed by it

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

@mrx23dot
Copy link
Author

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
Copy link
Member

pauby commented Nov 17, 2021

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
Copy link
Author

mrx23dot commented Nov 17, 2021

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
Copy link

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

@soredake
Copy link

Similar feature request for winget microsoft/winget-cli#3077

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

No branches or pull requests

3 participants