From 39f04bcc23981adc4fe591aaa9f29ef1edc4c6f6 Mon Sep 17 00:00:00 2001 From: TitanSnow Date: Sat, 22 Apr 2017 16:17:48 +0800 Subject: add version check --- scripts/get.ps1 | 4 ++++ 1 file changed, 4 insertions(+) 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{ -- cgit v1.3.1