Skip to content

Commit 59a748e

Browse files
committed
add error when running build script in PowerShell 5
1 parent 67cfb40 commit 59a748e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

build/scripts/prepare-install-package.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
#
99

1010

11+
##########
12+
## Validate environment
13+
##########
14+
if ($PSVersionTable.PSVersion.Major -lt 7) {
15+
Write-Error "This script needs PowerShell 7 or later. Run it using 'pwsh' instead." # needed for `$IsWindows`
16+
exit 1
17+
}
18+
19+
1120
##########
1221
## Read arguments
1322
##########

0 commit comments

Comments
 (0)