diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-04-20 10:56:00 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-31 11:16:09 -0300 |
commit | 3d9856ffb0cf49f7d6313b351f1b4d3f9da0cbde (patch) | |
tree | a3ddd651f64f46656452d0c8efd172e4c0c2bf49 | |
parent | 96add5a1c6f34e0f701d358ce33a4cfd087fc742 (diff) | |
download | luarocks-3d9856ffb0cf49f7d6313b351f1b4d3f9da0cbde.tar.gz luarocks-3d9856ffb0cf49f7d6313b351f1b4d3f9da0cbde.tar.bz2 luarocks-3d9856ffb0cf49f7d6313b351f1b4d3f9da0cbde.zip |
Add --project-tree flag, for prepending a flag
-rw-r--r-- | src/luarocks/command_line.lua | 4 | ||||
-rw-r--r-- | src/luarocks/util.lua | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/luarocks/command_line.lua b/src/luarocks/command_line.lua index c8026ab6..07f86a7f 100644 --- a/src/luarocks/command_line.lua +++ b/src/luarocks/command_line.lua | |||
@@ -131,6 +131,10 @@ function command_line.run_command(...) | |||
131 | cfg.branch = flags["branch"] | 131 | cfg.branch = flags["branch"] |
132 | end | 132 | end |
133 | 133 | ||
134 | if flags["project-tree"] then | ||
135 | table.insert(cfg.rocks_trees, 1, { name = "project", root = flags["project-tree"] } ) | ||
136 | end | ||
137 | |||
134 | if flags["tree"] then | 138 | if flags["tree"] then |
135 | local named = false | 139 | local named = false |
136 | for _, tree in ipairs(cfg.rocks_trees) do | 140 | for _, tree in ipairs(cfg.rocks_trees) do |
diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua index 64765a43..ea18071f 100644 --- a/src/luarocks/util.lua +++ b/src/luarocks/util.lua | |||
@@ -129,6 +129,7 @@ local supported_flags = { | |||
129 | ["output"] = "<file>", | 129 | ["output"] = "<file>", |
130 | ["pack-binary-rock"] = true, | 130 | ["pack-binary-rock"] = true, |
131 | ["porcelain"] = true, | 131 | ["porcelain"] = true, |
132 | ["project-tree"] = "<tree>", | ||
132 | ["quick"] = true, | 133 | ["quick"] = true, |
133 | ["rock-dir"] = true, | 134 | ["rock-dir"] = true, |
134 | ["rock-namespace"] = true, | 135 | ["rock-namespace"] = true, |