fix(pwsh): trust PSGallery (#33)

This prevents PowerShell from prompting if we should trust PSGallery during module installation without `-Force`
This commit is contained in:
Ryan
2021-10-09 11:03:19 +02:00
committed by GitHub
parent 8fabe83029
commit 168b321e02
+2
View File
@@ -30,6 +30,8 @@ pwsh -v
printf "\n\t🐋 Installing PowerShell modules 🐋\t\n"
modules=("MarkdownPS" "Pester" "PSScriptAnalyzer")
pwsh -nol -nop -c "Set-PSRepository -Name PSGallery -InstallationPolicy Trusted"
for mod in "${modules[@]}"; do
printf "\n\t🐋 Installing %s 🐋\t\n" "${mod}"
pwsh -nol -nop -c "Install-Module -Name ${mod} -Scope AllUsers -SkipPublisherCheck -Force"