fix: cli: ensureDebugFlagHasVal: fix multiple --debug flags not just one
This commit is contained in:
parent
66f4091b38
commit
361b0016ff
@ -577,7 +577,7 @@ replaceNumericFlags = map replace
|
|||||||
-- This makes an equals sign unnecessary with this optional-value flag.
|
-- This makes an equals sign unnecessary with this optional-value flag.
|
||||||
ensureDebugFlagHasVal :: [String] -> [String]
|
ensureDebugFlagHasVal :: [String] -> [String]
|
||||||
ensureDebugFlagHasVal as = case break (=="--debug") as of
|
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"]
|
(bs,["--debug"]) -> bs++["--debug=1"]
|
||||||
_ -> as
|
_ -> as
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user