Skip to content

Commit fe64dd3

Browse files
authored
chore(windows/make.ps1) ensure Pester is only installed as user (instead of system)
1 parent 102e383 commit fe64dd3

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

build.ps1

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,7 @@ if($target -eq 'test') {
190190
$mod = Get-InstalledModule -Name Pester -MinimumVersion 5.3.0 -MaximumVersion 5.3.3 -ErrorAction SilentlyContinue
191191
if($null -eq $mod) {
192192
Write-Host '= TEST: Pester 5.3.x not found: installing...'
193-
$module = 'C:\Program Files\WindowsPowerShell\Modules\Pester'
194-
if(Test-Path $module) {
195-
takeown /F $module /A /R
196-
icacls $module /reset
197-
icacls $module /grant Administrators:'F' /inheritance:d /T
198-
Remove-Item -Path $module -Recurse -Force -Confirm:$false
199-
}
200-
Install-Module -Force -Name Pester -MaximumVersion 5.3.3
193+
Install-Module -Force -Name Pester -MaximumVersion 5.3.3 -Scope CurrentUser
201194
}
202195

203196
Import-Module Pester

0 commit comments

Comments
 (0)