From 6dfbe854a0ccdf58877f7a078b6bf617629673b2 Mon Sep 17 00:00:00 2001 From: Jonathan Daugherty Date: Mon, 16 Mar 2015 13:27:22 -0700 Subject: [PATCH] Make postgrest show long help output with defaults on usage errors This makes optparse-applicative show the long version of help output. Its default behavior is not to do this since the showHelpOnError setting defaults to False. This turns it on. --- src/Main.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Main.hs b/src/Main.hs index abf897c35..b8e19af61 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -32,7 +32,8 @@ main = do <> prettyVersion <> " / create a REST API to an existing Postgres database" ) - conf <- execParser opts + parserPrefs = prefs showHelpOnError + conf <- customExecParser parserPrefs opts let port = configPort conf unless (configSecure conf) $