aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/cmd.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/cmd.lua b/src/luarocks/cmd.lua
index d038852b..8a07a92a 100644
--- a/src/luarocks/cmd.lua
+++ b/src/luarocks/cmd.lua
@@ -157,14 +157,14 @@ local function get_lua_version(flags)
157 return flags["lua-version"] 157 return flags["lua-version"]
158 end 158 end
159 local dirs = { 159 local dirs = {
160 cfg.home_tree, 160 dir.path(cfg.home_tree, ".luarocks"),
161 cfg.sysconfdir, 161 cfg.sysconfdir,
162 } 162 }
163 if flags["project-tree"] then 163 if flags["project-tree"] then
164 table.insert(dirs, 1, dir.path(flags["project-tree"], "..")) 164 table.insert(dirs, 1, dir.path(flags["project-tree"], "..", ".luarocks"))
165 end 165 end
166 for _, d in ipairs(dirs) do 166 for _, d in ipairs(dirs) do
167 local f = dir.path(d, ".luarocks", "default-lua-version.lua") 167 local f = dir.path(d, "default-lua-version.lua")
168 local mod, err = loadfile(f, "t") 168 local mod, err = loadfile(f, "t")
169 if mod then 169 if mod then
170 local pok, ver = pcall(mod) 170 local pok, ver = pcall(mod)