aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2013-12-01 10:21:53 +0100
committerThijs Schreijer <thijs@thijsschreijer.nl>2013-12-01 10:21:53 +0100
commit948a07074fc9edb5d0cc822a141b9f29381c1a4b (patch)
tree0da4ba87718266d9cc76d34c0ae662bd0198742b
parent03cc9208fbeec8065365cbd5d5c124a327b47a4a (diff)
downloadluarocks-948a07074fc9edb5d0cc822a141b9f29381c1a4b.tar.gz
luarocks-948a07074fc9edb5d0cc822a141b9f29381c1a4b.tar.bz2
luarocks-948a07074fc9edb5d0cc822a141b9f29381c1a4b.zip
If PowerShell is not available, a proper message is now displayed when installing on Windows without admin priviledges
Diffstat (limited to '')
-rw-r--r--install.bat4
1 files changed, 4 insertions, 0 deletions
diff --git a/install.bat b/install.bat
index 22f72e13..11558f7f 100644
--- a/install.bat
+++ b/install.bat
@@ -491,6 +491,10 @@ check_flags()
491if not permission() then 491if not permission() then
492 if not NOADMIN then 492 if not NOADMIN then
493 -- must elevate the process with admin priviledges 493 -- must elevate the process with admin priviledges
494 if not exec("PowerShell /? >NUL 2>&1") then
495 -- powershell is not available, so error out
496 die("No administrative priviledges detected and cannot auto-elevate. Please run with admin priviledges or use the /NOADMIN switch")
497 end
494 print("Need admin priviledges, now elevating a new process to continue installing...") 498 print("Need admin priviledges, now elevating a new process to continue installing...")
495 local runner = os.getenv("TEMP").."\\".."LuaRocks_Installer.bat" 499 local runner = os.getenv("TEMP").."\\".."LuaRocks_Installer.bat"
496 local f = io.open(runner, "w") 500 local f = io.open(runner, "w")