aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-05-12 19:16:34 +0000
committerhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-05-12 19:16:34 +0000
commitb4f32b4d095587982911bb4cf925638d136f902d (patch)
treed3fbd16df5474eeb4bb0e8a684727baf610ef254 /src
parent9554bbcab95242cd79710ece8118901de65ce6a5 (diff)
downloadluarocks-b4f32b4d095587982911bb4cf925638d136f902d.tar.gz
luarocks-b4f32b4d095587982911bb4cf925638d136f902d.tar.bz2
luarocks-b4f32b4d095587982911bb4cf925638d136f902d.zip
Add test for io.popen
git-svn-id: http://luarocks.org/svn/luarocks/trunk@22 9ca3f7c1-7366-0410-b1a3-b5c78f85698c
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