diff --git a/appveyor.yml b/appveyor.yml index a14ba9f..2f97a67 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,7 +21,7 @@ init: # Install Pester install: - - cinst -y pester + - choco install pester --version=4.10.1 -y # to run your custom scripts instead of automatic MSBuild build_script: diff --git a/tools/setup.psm1 b/tools/setup.psm1 index 702d02e..354b179 100644 --- a/tools/setup.psm1 +++ b/tools/setup.psm1 @@ -178,7 +178,7 @@ function Invoke-SHiPSTest { $TestResultsFile = Microsoft.PowerShell.Management\Join-Path -Path $script:TestHome -ChildPath "TestResults.xml" if($script:PowerShellEdition -eq 'Core') { - & $PowerShellExePath -Command "`$env:PSModulePath ; `$PSVersionTable; `$ProgressPreference = 'SilentlyContinue';Install-Module Pester -force; Import-Module Pester; Invoke-Pester -Script $script:TestHome -OutputFormat NUnitXml -OutputFile $TestResultsFile" + & $PowerShellExePath -Command "`$env:PSModulePath ; `$PSVersionTable; `$ProgressPreference = 'SilentlyContinue';Install-Module Pester -MaximumVersion 4.10.1 -Force; Import-Module Pester -MaximumVersion 4.10.1 -Force; Invoke-Pester -Script $script:TestHome -OutputFormat NUnitXml -OutputFile $TestResultsFile" } else { & $PowerShellExePath -Command "`$env:PSModulePath ; `$PSVersionTable; `$ProgressPreference = 'SilentlyContinue'; Invoke-Pester -Script $script:TestHome -OutputFormat NUnitXml -OutputFile $TestResultsFile"