aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFYP <its.fyp@gmail.com>2018-10-21 20:46:36 +0300
committerHisham Muhammad <hisham@gobolinux.org>2018-10-29 19:21:40 -0300
commit0c534c71465474b92710a2951bf15370fcc8c663 (patch)
tree4997ff7d01c747432e1a9b53518d533e3b12357b /src
parent8b60d7440ce6f215c7ea480950e4df5d190992f0 (diff)
downloadluarocks-0c534c71465474b92710a2951bf15370fcc8c663.tar.gz
luarocks-0c534c71465474b92710a2951bf15370fcc8c663.tar.bz2
luarocks-0c534c71465474b92710a2951bf15370fcc8c663.zip
cmd: fix setting up deployment paths from a tree
(Amended with a regression test.) Co-authored-by: Hisham Muhammad <hisham@gobolinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/cmd.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/luarocks/cmd.lua b/src/luarocks/cmd.lua
index fc98e45f..996900ff 100644
--- a/src/luarocks/cmd.lua
+++ b/src/luarocks/cmd.lua
@@ -150,10 +150,10 @@ end
150 150
151local process_tree_flags 151local process_tree_flags
152do 152do
153 local function replace_tree(flags, tree) 153 local function replace_tree(flags, root, tree)
154 tree = dir.normalize(tree) 154 root = dir.normalize(root)
155 flags["tree"] = tree 155 flags["tree"] = root
156 path.use_tree(tree) 156 path.use_tree(tree or root)
157 end 157 end
158 158
159 local function find_project_dir() 159 local function find_project_dir()
@@ -195,7 +195,7 @@ do
195 if not tree.root then 195 if not tree.root then
196 return nil, "Configuration error: tree '"..tree.name.."' has no 'root' field." 196 return nil, "Configuration error: tree '"..tree.name.."' has no 'root' field."
197 end 197 end
198 replace_tree(flags, tree.root) 198 replace_tree(flags, tree.root, tree)
199 named = true 199 named = true
200 break 200 break
201 end 201 end