File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 77 [switch ]$All ,
88
99 [Parameter (ParameterSetName = " BuildOne" )]
10- [ValidateRange (3 , 6 )]
10+ [ValidateRange (3 , 7 )]
1111 [int ]$PSVersion = $PSVersionTable.PSVersion.Major ,
1212
1313 [Parameter (ParameterSetName = " BuildOne" )]
@@ -36,6 +36,12 @@ param(
3636 [Parameter (ParameterSetName = ' Bootstrap' )]
3737 [switch ] $Bootstrap
3838)
39+ BEGIN {
40+ if ($PSVersion -gt 6 ) {
41+ # due to netstandard2.0 we do not need to treat PS version 7 differently
42+ $PSVersion = 6
43+ }
44+ }
3945
4046END {
4147 Import-Module - Force (Join-Path $PSScriptRoot build.psm1)
Original file line number Diff line number Diff line change @@ -144,6 +144,8 @@ function Start-ScriptAnalyzerBuild
144144 param (
145145 [switch ]$All ,
146146
147+ # Note that 6 should also be chosen for PowerShell7 as both implement netstandard2.0
148+ # and we do not use features from netstandard2.1
147149 [ValidateRange (3 , 6 )]
148150 [int ]$PSVersion = $PSVersionTable.PSVersion.Major ,
149151
You can’t perform that action at this time.
0 commit comments