-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Labels
Milestone
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 you decline to install a resource at the untrusted repository prompt it writes an error about not finding the resource in any repository.
The message also has a few typos with a space between repository name, PSrepository
to PSRepository
, and modules should be changed to resources.
You are installing the resources from an untrusted repository. If you trust this repository, change its Trusted value by running the Set-PSResourceRepository cmdlet. Are you sure you want to install the PSResource from '{0}'?
Expected behavior
No error is produced.
Actual behavior
PS C:\> Install-PSResource OperationValidation
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its Trusted value by
running the Set-PSResourceRepository cmdlet. Are you sure you want to install the PSresource from 'PSGallery' ?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):
Install-PSResource: Package 'OperationValidation' with requested version range (, ) could not be installed as it was not found in any registered repositories
Error details
Exception :
Type : System.ArgumentException
Message : Package 'OperationValidation' with requested version range (, ) could not be installed as it was not
found in any registered repositories
HResult : -2147024809
CategoryInfo : ObjectNotFound: (:) [Install-PSResource], ArgumentException
FullyQualifiedErrorId : ResourceNotFoundError,Microsoft.PowerShell.PowerShellGet.Cmdlets.InstallPSResource
InvocationInfo :
MyCommand : Install-PSResource
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 1
Line : Install-PSResource OperationValidation
PositionMessage : At line:1 char:1
+ Install-PSResource OperationValidation
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
InvocationName : Install-PSResource
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :
Environment data
Name Version
---- -------
PowerShellGet 3.0.14
Name Value
---- -----
PSVersion 7.2.5
PSEdition Core
GitCommitId 7.2.5
OS Microsoft Windows 10.0.19043
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