PowerShell / PowerShell/PSResourceGet
Install-PSResource should not require Prerelease for modules that don't have a stable version
Nobody has claimed this yet.
- 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
If a module does not have any stable versions then Install-PSResource should not require the use of Prerelease because all versions are prerelease.
It creates user confusion when it says the resource is not found on the repository when it does indeed exist.
Install-PSResource Microsoft.PowerShell.TextUtility
Install-PSResource: Package for installation could not be found due to: Package does not exist on the server.
Expected behavior
# Installs successfully
Actual behavior
Install-PSResource: Package for installation could not be found due to: Package does not exist on the server.
Error details
Exception :
Type : Microsoft.PowerShell.PSResourceGet.UtilClasses.InvalidOrEmptyResponse
Message : Package for installation could not be found due to: Package does not exist on the server.
HResult : -2146233088
TargetObject : Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallHelper
CategoryInfo : InvalidOperation: (Microsoft.PowerShel…dlets.InstallHelper:InstallHelper) [Install-PSResource], InvalidOrEmptyResponse
FullyQualifiedErrorId : InstallPackageFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource
InvocationInfo :
MyCommand : Install-PSResource
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 47
Line : Install-PSResource Microsoft.PowerShell.TextUtility
Statement : Install-PSResource Microsoft.PowerShell.TextUtility
PositionMessage : At line:1 char:1
+ Install-PSResource Microsoft.PowerShell.TextUtility
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
InvocationName : Install-PSResource
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :
Environment data
7.4-preview4
beta22
Visuals
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Install-PSResource Microsoft.PowerShell.TextUtility command in the reported PowerShell environment, then trace the Install-PSResource handling of prerelease filtering and repository lookup. Done means a module with no stable versions installs successfully without requiring the Prerelease parameter, while existing stable-version behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100