aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile2
-rw-r--r--src/luarocks/core/cfg.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 60f08dc8..4e814740 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -35,7 +35,7 @@ $(builddir)/config-$(LUA_VERSION).lua: config.unix
35 @printf -- '-- LuaRocks configuration\n\n'\ 35 @printf -- '-- LuaRocks configuration\n\n'\
36 'rocks_trees = {\n'\ 36 'rocks_trees = {\n'\
37 ' { name = "user", root = home .. "/.luarocks" };\n'\ 37 ' { name = "user", root = home .. "/.luarocks" };\n'\
38 ' { name = "system", root = "'"$(rocks_tree)"'" };\n'\ 38 "$$([ "$(rocks_tree)" != "$(HOME)/.luarocks" ] && printf ' { name = "system", root = "'"$(rocks_tree)"'" };\\n')"\
39 '}\n'\ 39 '}\n'\
40 "$$([ -n "$(LUA_INTERPRETER)" ] && printf 'lua_interpreter = "%s";\\n' "$(LUA_INTERPRETER)")"\ 40 "$$([ -n "$(LUA_INTERPRETER)" ] && printf 'lua_interpreter = "%s";\\n' "$(LUA_INTERPRETER)")"\
41 'variables = {\n'\ 41 'variables = {\n'\
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua
index 9859c6b3..75075792 100644
--- a/src/luarocks/core/cfg.lua
+++ b/src/luarocks/core/cfg.lua
@@ -710,7 +710,7 @@ function cfg.init(lua_data, project_dir, warning)
710 if cfg.home_tree then 710 if cfg.home_tree then
711 table.insert(cfg.rocks_trees, { name = "user", root = cfg.home_tree } ) 711 table.insert(cfg.rocks_trees, { name = "user", root = cfg.home_tree } )
712 end 712 end
713 if hardcoded.PREFIX then 713 if hardcoded.PREFIX and hardcoded.PREFIX ~= cfg.home_tree then
714 table.insert(cfg.rocks_trees, { name = "system", root = hardcoded.PREFIX } ) 714 table.insert(cfg.rocks_trees, { name = "system", root = hardcoded.PREFIX } )
715 end 715 end
716 end 716 end