PSResourceGet
PSResourceGet copied to clipboard
Install-PSResource not adding Scripts install path to $env:PATH and allowing to invoke installed script
PR Summary
Installing a script with Install-PSResource happens successfully except that the script installation path (%USERPROFILE%\Documents\PowerShell\Scripts) isn't added to the environment PATH variable, so the script can't be invoked without prepending install folder path.
PR Context
Resolves #709 and was working in V2.
PR Checklist
- [ ] PR has a meaningful title
- Use the present tense and imperative mood when describing your changes
- [ ] Summarized changes
- [ ] Make sure all
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header - [ ] This PR is ready to merge and is not Work in Progress.
- If the PR is work in progress, please add the prefix
WIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.
- If the PR is work in progress, please add the prefix
- Breaking changes
- [ ] None
- OR
- [ ] Documentation needed
- [ ] Issue filed:
- User-facing changes
- [ ] Not Applicable
- OR
- [ ] Documentation needed
- [ ] Issue filed:
- Testing - New and feature
- [ ] N/A or can only be tested interactively
- OR
- [ ] Make sure you've added a new test if existing tests do not effectively test the code changed
- Tooling
- [ ] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
- OR
- [ ] I have considered the user experience from a tooling perspective and enumerated concerns in the summary.
V2 prompts for user to accept/confirm the action before setting the environment variable. I'm not a fan of prompts but since it's changing the env var, I think it might be important to include (see: https://github.com/PowerShell/PowerShellGetv2/blob/5aba7531f526b6e60b2757c36799995597b6dcec/src/PowerShellGet/PSGet.Resource.psd1#L222 for the v2 prompt)
This looks good to me! Should be good once the tests are resolved.