aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/cfg.lua15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
index d0de70cc..5afb653d 100644
--- a/src/luarocks/cfg.lua
+++ b/src/luarocks/cfg.lua
@@ -1,6 +1,6 @@
1 1
2local rawset, next, table, pairs, print, require, io, os, setmetatable = 2local rawset, next, table, pairs, print, require, io, os, setmetatable, pcall =
3 rawset, next, table, pairs, print, require, io, os, setmetatable 3 rawset, next, table, pairs, print, require, io, os, setmetatable, pcall
4 4
5--- Configuration for LuaRocks. 5--- Configuration for LuaRocks.
6-- Tries to load the user's configuration file and 6-- Tries to load the user's configuration file and
@@ -13,6 +13,17 @@ program_version = "1.1"
13 13
14local persist = require("luarocks.persist") 14local persist = require("luarocks.persist")
15 15
16local popen_ok, popen_result = pcall(io.popen, "")
17if popen_ok then
18 if popen_result then
19 result:close()
20 end
21else
22 print("Your version of Lua does not support io.popen,")
23 print("which is required by LuaRocks. Please check your Lua installation.")
24 os.exit(1)
25end
26
16local detected = {} 27local detected = {}
17local system,proc 28local system,proc
18 29