Skip to content

Commit 3daea8b

Browse files
committed
Install BuildHelpers separately as we need to use -AllowClobber
1 parent a8a9de7 commit 3daea8b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

build.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
1515
if (-not (Get-Module -Name PSDepend -ListAvailable)) {
1616
Install-module -Name PSDepend -Repository PSGallery
1717
}
18-
Import-Module -Name PSDepend -ErrorAction Stop
19-
Invoke-PSDepend -Path .\requirements.psd1 -Install -Import -Force > $null
18+
Import-Module -Name PSDepend
19+
Invoke-PSDepend -Path .\requirements.psd1 -Install -Import -Force
20+
if (-not (Get-Module -Name BuildHelpers -ListAvailable)) {
21+
Install-Module -Name BuildHelpers -AllowClobber
22+
}
23+
Import-Module -Name BuildHelpers
2024

2125
if ($PSBoundParameters.ContainsKey('help')) {
2226
Get-PSakeScriptTasks -buildFile "$PSScriptRoot\psake.ps1" |

requirements.psd1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
PSDependOptions = @{
33
Target = 'CurrentUser'
44
}
5-
buildhelpers = 'latest'
65
psake = 'latest'
76
pester = 'latest'
87
psscriptanalyzer = 'latest'

0 commit comments

Comments
 (0)