From 0366c6eac698327ced9c63e241a9474a5c2a7e20 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 19 Feb 2018 14:03:23 -0400 Subject: fix --json-progress --json to be same as --json --json-progress Fix behavior of --json-progress followed by --json, in which the latter option disabled the former. This commit was supported by the NSF-funded DataLad project. --- Annex.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Annex.hs') diff --git a/Annex.hs b/Annex.hs index 4ab700332..7b4bb706c 100644 --- a/Annex.hs +++ b/Annex.hs @@ -275,7 +275,8 @@ addCleanup k a = changeState $ \s -> {- Sets the type of output to emit. -} setOutput :: OutputType -> Annex () setOutput o = changeState $ \s -> - s { output = (output s) { outputType = o } } + let m = output s + in s { output = m { outputType = adjustOutputType (outputType m) o } } {- Checks if a flag was set. -} getFlag :: String -> Annex Bool -- cgit v1.2.3