summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-04-24 00:33:45 +0800
committerruki <[email protected]>2020-04-23 21:22:34 +0800
commita8336ef46f5eee083f7d0ab0fef47e2e36da8a3a (patch)
tree3343533ffec4d994f3448cf725a44e058b89758a
parent277b66dba40e865570ff73be0376ce3e05909c73 (diff)
improve to option.parse
-rw-r--r--xmake/core/sandbox/modules/import/core/base/option.lua12
1 files changed, 1 insertions, 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