aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-05-23 14:54:44 -0300
committerHisham Muhammad <hisham@gobolinux.org>2018-05-31 11:16:09 -0300
commit6d22624e505d81ce58de2343a86c960518573e85 (patch)
tree7b16c0bbb06b211d198b4c6fbd28ad47c4e17e1d
parentc098b60152f9a31f94a27710ffcc1e3842dbb150 (diff)
downloadluarocks-6d22624e505d81ce58de2343a86c960518573e85.tar.gz
luarocks-6d22624e505d81ce58de2343a86c960518573e85.tar.bz2
luarocks-6d22624e505d81ce58de2343a86c960518573e85.zip
do not detect a typical legacy $HOME as a project dir
-rw-r--r--src/luarocks/command_line.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/luarocks/command_line.lua b/src/luarocks/command_line.lua
index 40ad06af..27965212 100644
--- a/src/luarocks/command_line.lua
+++ b/src/luarocks/command_line.lua
@@ -144,6 +144,11 @@ function command_line.run_command(...)
144 144
145 if flags["project-tree"] then 145 if flags["project-tree"] then
146 table.insert(cfg.rocks_trees, 1, { name = "project", root = flags["project-tree"] } ) 146 table.insert(cfg.rocks_trees, 1, { name = "project", root = flags["project-tree"] } )
147 else
148 local project_dir, rocks_tree = find_project_dir()
149 if project_dir then
150 table.insert(cfg.rocks_trees, 1, { name = "project", root = rocks_tree } )
151 end
147 end 152 end
148 153
149 if flags["tree"] then 154 if flags["tree"] then
@@ -170,13 +175,8 @@ function command_line.run_command(...)
170 end 175 end
171 replace_tree(flags, cfg.home_tree) 176 replace_tree(flags, cfg.home_tree)
172 else 177 else
173 local project_dir, rocks_tree = find_project_dir() 178 local trees = cfg.rocks_trees
174 if project_dir then 179 path.use_tree(trees[#trees])
175 path.use_tree(rocks_tree)
176 else
177 local trees = cfg.rocks_trees
178 path.use_tree(trees[#trees])
179 end
180 end 180 end
181 181
182 if type(cfg.root_dir) == "string" then 182 if type(cfg.root_dir) == "string" then