diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-24 14:05:02 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-31 11:16:09 -0300 |
commit | 9cc9cfebf29498899952690b7483cf1573866368 (patch) | |
tree | c72de3399eb51a0b192184bad02d89db6d1777b6 | |
parent | 9a67a7c047b6d743c8f9e534720b49c2fa25962b (diff) | |
download | luarocks-9cc9cfebf29498899952690b7483cf1573866368.tar.gz luarocks-9cc9cfebf29498899952690b7483cf1573866368.tar.bz2 luarocks-9cc9cfebf29498899952690b7483cf1573866368.zip |
build: `luarocks build` with no arguments does `luarocks make`
-rw-r--r-- | src/luarocks/cmd/build.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/luarocks/cmd/build.lua b/src/luarocks/cmd/build.lua index 0a408fb4..0c8c4d47 100644 --- a/src/luarocks/cmd/build.lua +++ b/src/luarocks/cmd/build.lua | |||
@@ -14,6 +14,7 @@ local cfg = require("luarocks.core.cfg") | |||
14 | local build = require("luarocks.build") | 14 | local build = require("luarocks.build") |
15 | local writer = require("luarocks.manif.writer") | 15 | local writer = require("luarocks.manif.writer") |
16 | local search = require("luarocks.search") | 16 | local search = require("luarocks.search") |
17 | local make = require("luarocks.cmd.make") | ||
17 | 18 | ||
18 | cmd_build.help_summary = "build/compile a rock." | 19 | cmd_build.help_summary = "build/compile a rock." |
19 | cmd_build.help_arguments = "[--pack-binary-rock] [--keep] {<rockspec>|<rock>|<name> [<version>]}" | 20 | cmd_build.help_arguments = "[--pack-binary-rock] [--keep] {<rockspec>|<rock>|<name> [<version>]}" |
@@ -97,10 +98,12 @@ end | |||
97 | -- @return boolean or (nil, string, exitcode): True if build was successful; nil and an | 98 | -- @return boolean or (nil, string, exitcode): True if build was successful; nil and an |
98 | -- error message otherwise. exitcode is optionally returned. | 99 | -- error message otherwise. exitcode is optionally returned. |
99 | function cmd_build.command(flags, name, version) | 100 | function cmd_build.command(flags, name, version) |
100 | if type(name) ~= "string" then | 101 | assert(type(name) == "string" or not name) |
101 | return nil, "Argument missing. "..util.see_help("build") | ||
102 | end | ||
103 | assert(type(version) == "string" or not version) | 102 | assert(type(version) == "string" or not version) |
103 | |||
104 | if not name then | ||
105 | return make.command(flags) | ||
106 | end | ||
104 | 107 | ||
105 | name = util.adjust_name_and_namespace(name, flags) | 108 | name = util.adjust_name_and_namespace(name, flags) |
106 | local deps_mode = deps.get_deps_mode(flags) | 109 | local deps_mode = deps.get_deps_mode(flags) |