-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Labels
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
New-PSScriptFileInfo -Description 'just for test' -RequiredModules @{ModuleName='Hyper-V'} -ExternalModuleDependencies 'Hyper-V' -Path test.ps1
Publish-PSResource -Path .\test.ps1 -Repository local
Expected behavior
script is published
Actual behavior
publish-psresource : Dependency 'Hyper-V' was not found in repository 'local'. Make sure the dependency is published to the repository before publishing this module.
Error details
Exception :
Type : System.ArgumentException
Message : Dependency 'Hyper-V' was not found in repository 'local'. Make sure the dependency is published to the repository before publishing this module.
HResult : -2147024809
CategoryInfo : ObjectNotFound: (:) [Publish-PSResource], ArgumentException
FullyQualifiedErrorId : DependencyNotFound,Microsoft.PowerShell.PSResourceGet.Cmdlets.PublishPSResource
InvocationInfo :
MyCommand : Publish-PSResource
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 297
Line : Publish-PSResource -Path .\test.ps1 -Repository local
PositionMessage : At line:1 char:1
+ Publish-PSResource -Path .\test.ps1 -Repository local
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
InvocationName : Publish-PSResource
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :
Environment data
PSResourceGet: 0.5.22
PowerShell: 5.1 and 7.3.5
Visuals
No response