From 81e9e0a4e877a91295c3d7fcc337db69fcd82ff6 Mon Sep 17 00:00:00 2001 From: Oldes Date: Wed, 7 Oct 2020 20:05:33 +0200 Subject: [PATCH] FIX: quit after using `--help` startup option fixes: https://github.com/Oldes/Rebol-issues/issues/2430 --- src/mezz/mezz-help.reb | 2 +- src/mezz/sys-start.reb | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mezz/mezz-help.reb b/src/mezz/mezz-help.reb index cc641e3b4c..6df81e4d28 100644 --- a/src/mezz/mezz-help.reb +++ b/src/mezz/mezz-help.reb @@ -382,7 +382,7 @@ import module [ ^[[1;32m--args data^[[m Explicit arguments to script (quoted) ^[[1;32m--do expr^[[m Evaluate expression (quoted) - ^[[1;32m--help (-?)^[[m Display this usage information + ^[[1;32m--help (-?)^[[m Display this usage information (then quit) ^[[1;32m--script file^[[m Explicit script filename ^[[1;32m--version tuple^[[m Script must be this version or greater diff --git a/src/mezz/sys-start.reb b/src/mezz/sys-start.reb index a97a1abd8e..b6d0be9e4c 100644 --- a/src/mezz/sys-start.reb +++ b/src/mezz/sys-start.reb @@ -90,12 +90,17 @@ start: func [ do bind-lib boot-mezz boot-mezz: 'done + ;loud-print "Init protocols..." foreach [spec body] boot-prot [module spec body] ;do bind-lib boot-prot boot-prot: 'done ;-- User is requesting usage info: - if flags/help [lib/usage quiet: true] + if flags/help [ + lib/usage + unless flags/halt [quit/now] + quiet: true + ] ;-- Print fancy banner (created by mezz plus): if any [