From 1a5415ba53e2c231eef4801a928a175ca7fe4c1f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Sep 2016 15:32:59 -0400 Subject: Make --json and --quiet suppress automatic init messages And any other messages that might be output before a command starts. Fixes a reversion introduced in version 5.20150727. During the optparse-applicative conversion, I needed a place to run per-command global option setters, and I made it get run during the seek stage. But that is too late to have --json and --quiet disable output produced in the check stage. Fix is just to run those per-command global option setters at the same time as the all-command global option setters. This commit was sponsored by Thom May. --- CmdLine.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CmdLine.hs') diff --git a/CmdLine.hs b/CmdLine.hs index 1c9ee7f90..c9de90ec0 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -99,7 +99,7 @@ parseCmd progname progdesc globaloptions allargs allcmds getparser = mkparser c = (,,) <$> pure c <*> getparser c - <*> combineGlobalOptions globaloptions + <*> combineGlobalOptions (globaloptions ++ cmdglobaloptions c) synopsis n d = n ++ " - " ++ d intro = mconcat $ concatMap (\l -> [H.text l, H.line]) (synopsis progname progdesc : commandList allcmds) -- cgit v1.2.3