From 0aaf18eb542d8150d2a3fa6319b6293e9562a991 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 21 Sep 2012 18:04:45 -0300 Subject: Test for missing argument. --- src/luarocks/lint.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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 = "" help = [[ This is a utility function that checks the syntax of a rockspec. -It reports success or failure if the text of a rockspec is +It returns success or failure if the text of a rockspec is syntactically correct. ]] function run(...) local flags, input = util.parse_flags(...) + if not input then + return nil, "Argument missing, see help." + end + local filename = input if not input:match(".rockspec$") then local err -- cgit v1.2.3-55-g6feb