From ec1e50642b62fa3dcf5a2c9f7fd582e403c17627 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 19 Feb 2018 14:28:17 -0400 Subject: add --json-error-messages (not yet implemented) Added --json-error-messages option, which includes error messages in the json output, rather than outputting them to stderr. The actual rediretion of errors is not implemented yet, this is only the docs and option plumbing. This commit was supported by the NSF-funded DataLad project. --- Types/Messages.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Types') diff --git a/Types/Messages.hs b/Types/Messages.hs index f259f3200..d45174bb7 100644 --- a/Types/Messages.hs +++ b/Types/Messages.hs @@ -21,12 +21,14 @@ data OutputType = NormalOutput | QuietOutput | JSONOutput JSONOptions data JSONOptions = JSONOptions { jsonProgress :: Bool + , jsonErrorMessages :: Bool } deriving (Show) adjustOutputType :: OutputType -> OutputType -> OutputType adjustOutputType (JSONOutput old) (JSONOutput new) = JSONOutput $ JSONOptions { jsonProgress = jsonProgress old || jsonProgress new + , jsonErrorMessages = jsonErrorMessages old || jsonErrorMessages new } adjustOutputType _old new = new -- cgit v1.2.3