aboutsummaryrefslogtreecommitdiff
path: root/src/luarocks/command_line.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luarocks/command_line.lua')
-rw-r--r--src/luarocks/command_line.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/luarocks/command_line.lua b/src/luarocks/command_line.lua
index a8977c24..a9cf9968 100644
--- a/src/luarocks/command_line.lua
+++ b/src/luarocks/command_line.lua
@@ -142,11 +142,7 @@ function command_line.run_command(...)
142 cfg.branch = flags["branch"] 142 cfg.branch = flags["branch"]
143 end 143 end
144 144
145 if flags["project-tree"] then 145 if flags["tree"] then
146 local tree = flags["project-tree"]
147 table.insert(cfg.rocks_trees, 1, { name = "project", root = tree } )
148 path.use_tree(tree)
149 elseif flags["tree"] then
150 local named = false 146 local named = false
151 for _, tree in ipairs(cfg.rocks_trees) do 147 for _, tree in ipairs(cfg.rocks_trees) do
152 if type(tree) == "table" and flags["tree"] == tree.name then 148 if type(tree) == "table" and flags["tree"] == tree.name then
@@ -162,6 +158,10 @@ function command_line.run_command(...)
162 local root_dir = fs.absolute_name(flags["tree"]) 158 local root_dir = fs.absolute_name(flags["tree"])
163 replace_tree(flags, root_dir) 159 replace_tree(flags, root_dir)
164 end 160 end
161 elseif flags["project-tree"] then
162 local tree = flags["project-tree"]
163 table.insert(cfg.rocks_trees, 1, { name = "project", root = tree } )
164 path.use_tree(tree)
165 elseif flags["local"] then 165 elseif flags["local"] then
166 if not cfg.home_tree then 166 if not cfg.home_tree then
167 die("The --local flag is meant for operating in a user's home directory.\n".. 167 die("The --local flag is meant for operating in a user's home directory.\n"..