PowerShell / PowerShell/PSResourceGet

Install-PSResource erroneously reports my scripts are not in the PATH

Open
#1,462 1 comment 1 reaction 1 assignee View on GitHub

@alerickson is already working on this.

Since Oct 30, 2023.

Area-Install Issue-Bug
Dominant language
C#
Stars
576
Forks
114
Avg merge
1d 2h
Merged PRs (30d)
7

Description

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.
Steps to reproduce

When I run Install-PSResource Install-RequiredModule it warns me:

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, F:\Users\Jaykul\OneDrive - PoshCode\Documents\PowerShell\Scripts, to the environment PATH variable.

But that path is in my PATH variable.

image

Expected behavior
It should just install the script.
Actual behavior
It slanders my PATH, and makes me double-check my work 😜
Error details
Install-PSResource Install-RequiredModule
Environment data
> $(Get-Module Microsoft.PowerShell.PSResourceGet | Out-String; $PSVersionTable | Format-Table | Out-String ) | Set-Clipboard

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     1.0.0                 Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-…



Name                           Value
----                           -----
PSVersion                      7.4.0-preview.6
PSEdition                      Core
GitCommitId                    7.4.0-preview.6
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Visuals

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.