From dc1ce57c59c2c1166a66d9632264938febb90909 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Fri, 1 Feb 2013 19:56:32 +0100 Subject: [PATCH] Make sure new-source gets the correct number of arguments Signed-off-by: Tobias Ulmer --- local/e2-new-source.lua | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.39.5