]> git.e2factory.org Git - e2factory.git/commitdiff
Make sure new-source gets the correct number of arguments
authorTobias Ulmer <tu@emlix.com>
Fri, 1 Feb 2013 18:56:32 +0000 (19:56 +0100)
committerTobias Ulmer <tu@emlix.com>
Tue, 26 Feb 2013 18:07:14 +0000 (19:07 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/e2-new-source.lua

index 1e20b578e95e1c0982b4371c784f2a258fa276ca..f99769fa6907afdee658243f10af4c08093ed9d3 100644 (file)
@@ -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