From 95aff7c33f59fd7939a27e88168e2f4166938ee1 Mon Sep 17 00:00:00 2001 From: Matt Gucci Date: Tue, 7 Jun 2022 22:53:48 +0900 Subject: [PATCH] Set Pester MaximumVersion 4.10.1 --- appveyor.yml | 2 +- tools/setup.psm1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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"