Skip to content

Commit

Permalink
Merge pull request #29 from umn-microsoft-automation/trust-ps-repository
Browse files Browse the repository at this point in the history
Changes to Install-RequiredModule script require adding the -TrustRegisteredRepositories flag so it will install from PSGallery, which is untrusted by default.
  • Loading branch information
FISHMANPET authored Dec 3, 2021
2 parents b486e16 + 9e89d2c commit 120a606
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PSModules/stages/build-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ stages:
# Apparently, Install-Script isn't good enough except on Windows?
# Install-Script Install-RequiredModule -Force -Verbose
Save-Script Install-RequiredModule -Path '$(Pipeline.Workspace)'
&"$(Pipeline.Workspace)/Install-RequiredModule" -Path '$(Build.SourcesDirectory)/RequiredModules.psd1' -Confirm:$false -Verbose
&"$(Pipeline.Workspace)/Install-RequiredModule" -Path '$(Build.SourcesDirectory)/RequiredModules.psd1' -Confirm:$false -Verbose -TrustRegisteredRepositories
foreach ($installErr in $IRM_InstallErrors) {
Write-Warning "ERROR: $installErr"
Write-Warning "STACKTRACE: $($installErr.ScriptStackTrace)"
Expand Down
2 changes: 1 addition & 1 deletion PSModules/stages/test-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ stages:
# Apparently, Install-Script isn't good enough except on Windows?
# Install-Script Install-RequiredModule -Force -Verbose
Save-Script Install-RequiredModule -Path '$(Pipeline.Workspace)'
&"$(Pipeline.Workspace)/Install-RequiredModule" -Path '$(Build.SourcesDirectory)/RequiredModules.psd1' -Confirm:$false -Verbose
&"$(Pipeline.Workspace)/Install-RequiredModule" -Path '$(Build.SourcesDirectory)/RequiredModules.psd1' -Confirm:$false -Verbose -TrustRegisteredRepositories
foreach ($installErr in $IRM_InstallErrors) {
Write-Warning "ERROR: $installErr"
Write-Warning "STACKTRACE: $($installErr.ScriptStackTrace)"
Expand Down

0 comments on commit 120a606

Please sign in to comment.