Checklist
What is the issue?
Installing Pester using Install-PSResource triggers a warning about missing Modules folder in PATH environment variable. This affects all recent Pester versions
PS> Install-PSResource Pester
WARNING: The installation path for the script does not currently appear in the CurrentUser path environment variable. To make the script discoverable, add the script installation path, /home/vscode/.local/share/powershell/Modules, to the environment PATH variable.
Expected Behavior
No warning
Steps To Reproduce
Install-PSResource Pester
Describe your environment
No response
Possible Solution?
Trying to fix in PSResourceGet first, see PowerShell/PSResourceGet#1043.
The warning is a side effect of the file Pester.ps1, marking Pester with isScript = true which is later used in the warning-check if (!_savePkg && isScript). Changing the latter to if (!_savePkg && isScript && !isModule) should suffice.
If not approved, we need to rename Pester.ps1 to something else.
Checklist
What is the issue?
Installing Pester using
Install-PSResourcetriggers a warning about missing Modules folder in PATH environment variable. This affects all recent Pester versionsExpected Behavior
No warning
Steps To Reproduce
Install-PSResource PesterDescribe your environment
No response
Possible Solution?
Trying to fix in PSResourceGet first, see PowerShell/PSResourceGet#1043.
The warning is a side effect of the file
Pester.ps1, marking Pester withisScript = truewhich is later used in the warning-checkif (!_savePkg && isScript). Changing the latter toif (!_savePkg && isScript && !isModule)should suffice.If not approved, we need to rename
Pester.ps1to something else.