Skip to content

Commit ea70855

Browse files
authored
Update version check in PSScriptAnalyzer.psm1 to align with SMA version for PowerShell 7 (#2107)
* Update PSScriptAnalyzer.psm1 * Update Directory.Packages.props
1 parent 78ee946 commit ea70855

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
1010
<PackageVersion Include="Pluralize.NET" Version="1.0.2" />
1111
<PackageVersion Include="PowerShellStandard.Library" Version="5.1.1" />
12+
<!-- Please update minimumPowerShellCoreVersion in PSScriptAnalyzer.psm1 when updating below SMA version for better user-facing error message -->
1213
<PackageVersion Include="System.Management.Automation" Version="7.4.7" />
1314
<PackageVersion Include="System.Reflection.TypeExtensions" Version="4.7.0" />
1415
</ItemGroup>

Engine/PSScriptAnalyzer.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $PSModuleRoot = $PSModule.ModuleBase
99

1010
# Import the appropriate nested binary module based on the current PowerShell version
1111
$binaryModuleRoot = $PSModuleRoot
12-
[Version] $minimumPowerShellCoreVersion = '7.2.11'
12+
[Version] $minimumPowerShellCoreVersion = '7.4.7'
1313
if ($PSVersionTable.PSVersion.Major -ge 6) {
1414
$binaryModuleRoot = Join-Path -Path $PSModuleRoot -ChildPath "PSv$($PSVersionTable.PSVersion.Major)"
1515
# Minimum PowerShell Core version given by PowerShell Core support itself and

0 commit comments

Comments
 (0)