We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using this in the Puppet file:
pspackageprovider { 'Nuget': ensure => 'present', provider => 'windowspowershell', } psrepository { 'PSGallery': ensure => present, source_location => 'https://www.powershellgallery.com/api/v2', installation_policy => 'trusted', } package { 'NexusManagement': ensure => latest, provider => 'windowspowershell', }
I get this error:
Error: Could not get latest version: Execution of 'C:/Windows/System32/WindowsPowerShell/v1.0/powershell.EXE -NoProfile -ExecutionPolicy Bypass -NonInteractive -NoLogo -Command $ProgressPreference = 'SilentlyContinue'; $ErrorActionPreference = 'Stop'; [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; $mod = Find-Module NexusManagement -Repository ; $mod.Version.ToString()' returned 1: Find-Module : Missing an argument for parameter 'Repository'. Specify a parameter of type 'System.String[]' and try again. At line:1 char:241 + ... lType]::Tls12; $mod = Find-Module NexusManagement -Repository ; $mod. ... + ~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Find-Module], ParentContainsErrorRecordException + FullyQualifiedErrorId : MissingArgument,Find-Module Error: /Stage[main]/Main/Package[NexusManagement]/ensure: change from ['0.2.0'] to 'latest' failed: Could not get latest version: Execution of 'C:/Windows/System32/WindowsPowerShell/v1.0/powershell.EXE -NoProfile -ExecutionPolicy Bypass -NonInteractive -NoLogo -Command $ProgressPreference = 'SilentlyContinue'; $ErrorActionPreference = 'Stop'; [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; $mod = Find-Module NexusManagement -Repository ; $mod.Version.ToString()' returned 1: Find-Module : Missing an argument for parameter 'Repository'. Specify a parameter of type 'System.String[]' and try again. At line:1 char:241 + ... lType]::Tls12; $mod = Find-Module NexusManagement -Repository ; $mod. ... + ~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Find-Module], ParentContainsErrorRecordException + FullyQualifiedErrorId : MissingArgument,Find-Module
The instructions indicate that You do not need to specify the PSGallery with the psrepository type but this doesn't appear to be the case.
If I add 'Source' then it works as it should:
package { 'NexusManagement': ensure => latest, source => 'PSGallery', provider => 'windowspowershell', }
I haven't dug into the code but it's clear from the errors that the default source 'PSGallery' is not being passed through.
The text was updated successfully, but these errors were encountered:
@gsperry2011 can you look into this?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
When using this in the Puppet file:
I get this error:
The instructions indicate that You do not need to specify the PSGallery with the psrepository type but this doesn't appear to be the case.
If I add 'Source' then it works as it should:
I haven't dug into the code but it's clear from the errors that the default source 'PSGallery' is not being passed through.
The text was updated successfully, but these errors were encountered: