Skip to content

Install-PSResource Pester shows installation path warning #2826

Description

@fflaten

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions