From a8336ef46f5eee083f7d0ab0fef47e2e36da8a3a Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 24 Apr 2020 00:33:45 +0800 Subject: improve to option.parse --- xmake/core/sandbox/modules/import/core/base/option.lua | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/xmake/core/sandbox/modules/import/core/base/option.lua b/xmake/core/sandbox/modules/import/core/base/option.lua index cd00ea213..993231249 100644 --- a/xmake/core/sandbox/modules/import/core/base/option.lua +++ b/xmake/core/sandbox/modules/import/core/base/option.lua @@ -93,27 +93,17 @@ function sandbox_core_base_option.parse(argv, options, ...) -- parse it local results, errors = option.parse(argv, options) if not results then - - -- show help show_help() - - -- raise errors raise(errors) end -- help? if results.help then - - -- show help show_help() - - -- exit - raise() + os.exit() else results.help = show_help end - - -- ok return results end -- cgit v1.3.1