summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTitanSnow <[email protected]>2017-04-22 16:17:48 +0800
committerTitanSnow <[email protected]>2017-04-22 16:17:48 +0800
commit39f04bcc23981adc4fe591aaa9f29ef1edc4c6f6 (patch)
tree5c89ceb1c7e622c9ed8bf8dad379f78d25b1140a /scripts
parent2ba18fd87e2af7461dd675bfefd6326c1c1e444f (diff)
add version check
Diffstat (limited to 'scripts')
-rw-r--r--scripts/get.ps14
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{