From: Tobias Ulmer Date: Fri, 1 Feb 2013 18:56:32 +0000 (+0100) Subject: Make sure new-source gets the correct number of arguments X-Git-Tag: e2factory-2.3.13rc1~29 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=dc1ce57c59c2c1166a66d9632264938febb90909;p=e2factory.git Make sure new-source gets the correct number of arguments Signed-off-by: Tobias Ulmer --- diff --git a/local/e2-new-source.lua b/local/e2-new-source.lua index 1e20b57..f99769f 100644 --- a/local/e2-new-source.lua +++ b/local/e2-new-source.lua @@ -269,6 +269,10 @@ if opts.git then end e2lib.log(1, "Read e2-new-source(1) for the next step") elseif opts.files then + if #arguments < 2 or #arguments > 3 then + e2option.usage(1) + end + local location = arguments[1] local sl, e = e2lib.parse_server_location(location, info.default_files_server) if not sl then