aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2012-09-21 18:04:45 -0300
committerHisham Muhammad <hisham@gobolinux.org>2012-09-21 18:04:45 -0300
commit0aaf18eb542d8150d2a3fa6319b6293e9562a991 (patch)
tree979cc884b465654064b1e0d9c6a8c4378907ba09
parent80030511768584581540f3508c504d3006c88f90 (diff)
downloadluarocks-0aaf18eb542d8150d2a3fa6319b6293e9562a991.tar.gz
luarocks-0aaf18eb542d8150d2a3fa6319b6293e9562a991.tar.bz2
luarocks-0aaf18eb542d8150d2a3fa6319b6293e9562a991.zip
Test for missing argument.
-rw-r--r--src/luarocks/lint.lua6
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>"
12help = [[ 12help = [[
13This is a utility function that checks the syntax of a rockspec. 13This is a utility function that checks the syntax of a rockspec.
14 14
15It reports success or failure if the text of a rockspec is 15It returns success or failure if the text of a rockspec is
16syntactically correct. 16syntactically correct.
17]] 17]]
18 18
19function run(...) 19function 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