diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/cfg.lua | 15 |
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 | ||
2 | local rawset, next, table, pairs, print, require, io, os, setmetatable = | 2 | local 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 | ||
14 | local persist = require("luarocks.persist") | 14 | local persist = require("luarocks.persist") |
15 | 15 | ||
16 | local popen_ok, popen_result = pcall(io.popen, "") | ||
17 | if popen_ok then | ||
18 | if popen_result then | ||
19 | result:close() | ||
20 | end | ||
21 | else | ||
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) | ||
25 | end | ||
26 | |||
16 | local detected = {} | 27 | local detected = {} |
17 | local system,proc | 28 | local system,proc |
18 | 29 | ||