Skip to content

Commit d3e3dca

Browse files
committed
Force installation of required modules in azurePipelinesBuild.ps1
This suddenly decided to be an issue, where the modules were being not being installed because `-Force` was missing (also clean up because we don't need `-Confirm:$false`). Who knows :/
1 parent 48f3966 commit d3e3dca

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: tools/azurePipelinesBuild.ps1

+5-5
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)