diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2012-09-21 18:04:45 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2012-09-21 18:04:45 -0300 |
commit | 0aaf18eb542d8150d2a3fa6319b6293e9562a991 (patch) | |
tree | 979cc884b465654064b1e0d9c6a8c4378907ba09 | |
parent | 80030511768584581540f3508c504d3006c88f90 (diff) | |
download | luarocks-0aaf18eb542d8150d2a3fa6319b6293e9562a991.tar.gz luarocks-0aaf18eb542d8150d2a3fa6319b6293e9562a991.tar.bz2 luarocks-0aaf18eb542d8150d2a3fa6319b6293e9562a991.zip |
Test for missing argument.
-rw-r--r-- | src/luarocks/lint.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/luarocks/lint.lua b/src/luarocks/lint.lua index 63b549aa..61388af6 100644 --- a/src/luarocks/lint.lua +++ b/src/luarocks/lint.lua | |||
@@ -12,13 +12,17 @@ help_arguments = "<rockspec>" | |||
12 | help = [[ | 12 | help = [[ |
13 | This is a utility function that checks the syntax of a rockspec. | 13 | This is a utility function that checks the syntax of a rockspec. |
14 | 14 | ||
15 | It reports success or failure if the text of a rockspec is | 15 | It returns success or failure if the text of a rockspec is |
16 | syntactically correct. | 16 | syntactically correct. |
17 | ]] | 17 | ]] |
18 | 18 | ||
19 | function run(...) | 19 | function run(...) |
20 | local flags, input = util.parse_flags(...) | 20 | local flags, input = util.parse_flags(...) |
21 | 21 | ||
22 | if not input then | ||
23 | return nil, "Argument missing, see help." | ||
24 | end | ||
25 | |||
22 | local filename = input | 26 | local filename = input |
23 | if not input:match(".rockspec$") then | 27 | if not input:match(".rockspec$") then |
24 | local err | 28 | local err |