diff options
| author | ruki <[email protected]> | 2016-05-25 12:59:23 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-05-25 12:59:23 +0800 |
| commit | af0d4247f488cdec9f0ba0a05f484e8f9fcfa59b (patch) | |
| tree | 556816ba5df8a1ca41780dcee1d36b9480c0d31b /xmake/core/base/option.lua | |
| parent | c8f23de807e6efcd6b797a6dde6366d67f64906d (diff) | |
dump deprecated entries
Diffstat (limited to 'xmake/core/base/option.lua')
| -rw-r--r-- | xmake/core/base/option.lua | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/xmake/core/base/option.lua b/xmake/core/base/option.lua index eedeec158..9acf1b48b 100644 --- a/xmake/core/base/option.lua +++ b/xmake/core/base/option.lua @@ -175,12 +175,12 @@ function option.init(argv, menu) -- check key if prefix and #key == 0 then - -- invalid option - print("invalid option: " .. arg) - -- print menu option.show_menu(context.taskname) + -- invalid option + print("\nerror: invalid option: " .. arg) + -- failed return false end @@ -209,12 +209,12 @@ function option.init(argv, menu) -- not found? if not opt then - -- invalid option - print("invalid option: " .. arg) - -- print menu option.show_menu(context.taskname) + -- invalid option + print("\nerror: invalid option: " .. arg) + -- failed return false end @@ -229,12 +229,12 @@ function option.init(argv, menu) _k = idx if idx == nil or arg:startswith("-") then - -- invalid option - print("invalid option: " .. option._ifelse(idx, arg, key)) - -- print menu option.show_menu(context.taskname) + -- invalid option + print("\nerror: invalid option: " .. option._ifelse(idx, arg, key)) + -- failed return false end @@ -246,12 +246,12 @@ function option.init(argv, menu) -- check mode if (opt[3] == "k" and type(value) ~= "boolean") or (opt[3] == "kv" and type(value) ~= "string") then - -- invalid option - print("invalid option: " .. arg) - -- print menu option.show_menu(context.taskname) + -- invalid option + print("\nerror: invalid option: " .. arg) + -- failed return false end @@ -283,12 +283,12 @@ function option.init(argv, menu) -- not found? if not context.taskname or not menu[context.taskname] then - -- invalid task - print("invalid task: " .. key) - -- print the main menu option.show_main() + -- invalid task + print("\nerror: invalid task: " .. key) + -- failed return false @@ -345,12 +345,13 @@ function option.init(argv, menu) table.insert(o, key) end else - -- invalid option - print("invalid option: " .. arg) -- print menu option.show_menu(context.taskname) + -- invalid option + print("\nerror: invalid option: " .. arg) + -- failed return false end |
