-
Notifications
You must be signed in to change notification settings - Fork 905
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
RefreshEnv (Refresh Environment Variables) Should also work in PowerShell #664
Comments
cmd.exe has long had a nice command to run to update environment variables without needing to close the shell: `refreshenv`. Bring that functionality to PowerShell.exe as well.
Provide PowerShell tab completion for Chocolatey commands including - searching for installed packages for upgrade/uninstall - searching for packages to install - only return the top 5 results from a search and only search by id Also set refreshenv as part of the profile additions.
@ferventcoder How do we use this? I've installed 0.9.10.3 and I can still only see Refreshenv.cmd, no Refreshenv.ps1. Reason I'm fooling around with Refreshenv is that I just installed puppet-agent and |
It's not the name of the file. You are running a function alias that has been added to PowerShell through your profile. |
Have you tried running the function? |
Sorry, was responding from the email and didn't see that you added more here. From the install of choco, it would have added to the profile of the installing user. Then you need to run |
If it isn't in your profile, you will need to add the module to it. We are working on a troubleshooting doc for this |
@ferventcoder Ah, yes, I noticed that message but I didn't have a chance to react because it was part of a script. It works if I add a line to source my profile, thanks! |
Currently it doesn't work in PS |
@ihor-drachuk |
In common, it would be fine if it could work without such unobvious dependencies. Or if dependencies are installed with the tool, which is installed, but currently doesn't work without them. Or if tool failed to do it's work, then let it notify somehow about failure and suggest that there are some missing component and there are some solution. @TheCakeIsNaOH Thank you for information, I'll try. |
@ihor-drachuk generally if you have a PowerShell Profile it will add the code to import the
As for being unobvious, Chocolatey does alert you to this during the install process (to be fair this just says tab completion, and not a word about refreshenv): |
@corbob Thanks for the answer. Exactly! I'm expecting working just |
cmd.exe has long had a nice command to run to update environment variables without needing to close the shell:
refreshenv
. Bring that functionality to PowerShell.exe as well.The text was updated successfully, but these errors were encountered: