diff options
| author | TitanSnow <[email protected]> | 2017-04-22 16:17:48 +0800 |
|---|---|---|
| committer | TitanSnow <[email protected]> | 2017-04-22 16:17:48 +0800 |
| commit | 39f04bcc23981adc4fe591aaa9f29ef1edc4c6f6 (patch) | |
| tree | 5c89ceb1c7e622c9ed8bf8dad379f78d25b1140a /scripts | |
| parent | 2ba18fd87e2af7461dd675bfefd6326c1c1e444f (diff) | |
add version check
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/get.ps1 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/get.ps1 b/scripts/get.ps1 index 92db7c666..ec02f7216 100644 --- a/scripts/get.ps1 +++ b/scripts/get.ps1 @@ -12,6 +12,10 @@ Function myExit($code){ } } +if($PSVersionTable.PSVersion.Major -lt 5){ + Write-Host 'Sorry but PowerShell v5+ is required' + throw 'PowerShell''s version too low' +} $temppath=($env:TMP,$env:TEMP,'.' -ne $null)[0] $outfile=$temppath+"\$pid-xmake-installer.exe" try{ |
