diff options
author | hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> | 2009-10-29 20:08:08 +0000 |
---|---|---|
committer | hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> | 2009-10-29 20:08:08 +0000 |
commit | 069395a90d667e1a93b0bd25b490a9fc1986be41 (patch) | |
tree | 0dd77db6d06577f3b47d80203868d23fd8d8bb74 /src | |
parent | 995bbe3f71c591296a42f2bbe79060d64af1a5f5 (diff) | |
download | luarocks-069395a90d667e1a93b0bd25b490a9fc1986be41.tar.gz luarocks-069395a90d667e1a93b0bd25b490a9fc1986be41.tar.bz2 luarocks-069395a90d667e1a93b0bd25b490a9fc1986be41.zip |
add check to allow use of an uninstalled instance during development
git-svn-id: http://luarocks.org/svn/luarocks/trunk@118 9ca3f7c1-7366-0410-b1a3-b5c78f85698c
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/cfg.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua index 881db683..710ca8f4 100644 --- a/src/luarocks/cfg.lua +++ b/src/luarocks/cfg.lua | |||
@@ -10,7 +10,11 @@ local rawset, next, table, pairs, print, require, io, os, setmetatable, pcall, i | |||
10 | module("luarocks.cfg") | 10 | module("luarocks.cfg") |
11 | 11 | ||
12 | -- Load site-local global configurations | 12 | -- Load site-local global configurations |
13 | local config = require("luarocks.config") | 13 | local ok, config = pcall(require, "luarocks.config") |
14 | if not ok then | ||
15 | print("Site-local luarocks/config.lua file not found. Incomplete installation?") | ||
16 | config = {} | ||
17 | end | ||
14 | 18 | ||
15 | program_version = "2.0.1" | 19 | program_version = "2.0.1" |
16 | user_agent = "LuaRocks/"..program_version | 20 | user_agent = "LuaRocks/"..program_version |