From 361b0016ff5c4b1ec107c601c23cf0f305bb45ba Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 24 Jun 2024 14:24:30 +0100 Subject: [PATCH] fix: cli: ensureDebugFlagHasVal: fix multiple --debug flags not just one --- hledger/Hledger/Cli/CliOptions.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger/Hledger/Cli/CliOptions.hs b/hledger/Hledger/Cli/CliOptions.hs index ac7c9cf93..98bcb0670 100644 --- a/hledger/Hledger/Cli/CliOptions.hs +++ b/hledger/Hledger/Cli/CliOptions.hs @@ -577,7 +577,7 @@ replaceNumericFlags = map replace -- This makes an equals sign unnecessary with this optional-value flag. ensureDebugFlagHasVal :: [String] -> [String] ensureDebugFlagHasVal as = case break (=="--debug") as of - (bs,"--debug":c:cs) | null c || not (all isDigit c) -> bs++"--debug=1":c:cs + (bs,"--debug":c:cs) | null c || not (all isDigit c) -> bs++"--debug=1" : ensureDebugFlagHasVal (c:cs) (bs,["--debug"]) -> bs++["--debug=1"] _ -> as