From d7969592d6e3a9ac6dd497e5dafa5081c2af0841 Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Thu, 11 Feb 2010 12:21:42 +0100 Subject: [PATCH] bugfix: options: print a proper error message when an unknown option is passed Signed-off-by: Gordon Hecker --- generic/e2option.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generic/e2option.lua b/generic/e2option.lua index bdbf514..50b8f22 100644 --- a/generic/e2option.lua +++ b/generic/e2option.lua @@ -322,7 +322,8 @@ function parse(args) local set = string.explode(opt) for k, v in pairs(set) do if not options[ v ] then - usage(1) + e2lib.abort(string.format("invalid option: %s\n".. + "Try the --help option for usage information.", opt)) else table.insert(args, "-" .. v) end -- 2.39.5