Skip to content

Commit 464dd82

Browse files
committed
Enforce PowerShell version requirement: minimum 7.4 for build script.
1 parent 2856a21 commit 464dd82

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.build.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ if ($UpdateMarkdown -and ($Tasks -notcontains 'GenerateHelp')) {
3737
if ($PushToGallery -and ($Tasks -notcontains 'Release')) {
3838
throw "-PushToGallery is only valid when -Tasks includes 'Release'. Current Tasks: $($Tasks -join ', ')"
3939
}
40-
40+
# Template requirement: PowerShell (pwsh) only. Windows PowerShell 5.1 is unsupported.
41+
if ($PSVersionTable.PSVersion -lt [Version]'7.4') {
42+
throw "This build requires PowerShell 7.4+. Current: $($PSVersionTable.PSVersion). Use 'pwsh' and retry."
43+
}
4144
# --- Setup ---
4245

4346
Set-StrictMode -Version Latest

0 commit comments

Comments
 (0)