Skip to content

Commit 9add252

Browse files
committed
Force installation of required modules in CI
1 parent 222e485 commit 9add252

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/azurePipelinesBuild.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ $ErrorActionPreference = 'Stop'
66
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | Out-Null
77
if ($IsWindows -or $PSVersionTable.PSVersion.Major -lt 6) {
88
# We rely on PowerShellGet's -AllowPrerelease which is in PowerShellGet 1.6 so we need to update PowerShellGet.
9-
Get-Module PowerShellGet,PackageManagement | Remove-Module -Force -Verbose
10-
powershell -Command { Install-Module -Name PowerShellGet -MinimumVersion 1.6 -Force -Confirm:$false -Verbose }
11-
powershell -Command { Install-Module -Name PackageManagement -MinimumVersion 1.1.7.0 -Force -Confirm:$false -Verbose }
9+
Get-Module PowerShellGet,PackageManagement | Remove-Module -Force
10+
powershell -Command { Install-Module -Name PowerShellGet -MinimumVersion 1.6 -Force }
11+
powershell -Command { Install-Module -Name PackageManagement -MinimumVersion 1.1.7.0 -Force }
1212
Import-Module -Name PowerShellGet -MinimumVersion 1.6 -Force
1313
Import-Module -Name PackageManagement -MinimumVersion 1.1.7.0 -Force
1414
}
@@ -17,7 +17,7 @@ if ($IsWindows -or $PSVersionTable.PSVersion.Major -lt 6) {
1717
Update-Help -Force -ErrorAction SilentlyContinue
1818

1919
# Needed for build and docs gen.
20-
Install-Module InvokeBuild -MaximumVersion 5.1.0 -Scope CurrentUser
21-
Install-Module PlatyPS -RequiredVersion 0.9.0 -Scope CurrentUser
20+
Install-Module -Name InvokeBuild -MaximumVersion 5.1.0 -Scope CurrentUser -Force
21+
Install-Module -Name PlatyPS -RequiredVersion 0.9.0 -Scope CurrentUser -Force
2222

2323
Invoke-Build -Configuration Release

0 commit comments

Comments
 (0)