PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

Install-PSResource not adding Scripts install path to $env:PATH and allowing to invoke installed script

Open anamnavi opened this issue 3 years ago • 1 comments

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

anamnavi avatar Aug 15 '22 14:08 anamnavi

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)

alerickson avatar Aug 15 '22 20:08 alerickson

This looks good to me! Should be good once the tests are resolved.

alerickson avatar Aug 22 '22 23:08 alerickson