cli: avoid processValue which prints stack traces (fixes #529)

This commit is contained in:
Simon Michael 2017-03-29 07:45:07 -07:00
parent 5d2f9d742a
commit 0e9b3dc4b9
2 changed files with 2 additions and 2 deletions

View File

@ -444,7 +444,7 @@ checkCliOpts opts =
getHledgerCliOpts :: Mode RawOpts -> IO CliOpts
getHledgerCliOpts mode' = do
args' <- getArgs
let rawopts = decodeRawOpts $ processValue mode' args'
let rawopts = either optserror decodeRawOpts $ process mode' args'
opts <- rawOptsToCliOpts rawopts
debugArgs args' opts
when ("help" `inRawOpts` rawopts_ opts) $ putStr longhelp >> exitSuccess

View File

@ -164,7 +164,7 @@ argsToCliOpts :: [String] -> [String] -> IO CliOpts
argsToCliOpts args addons = do
let
args' = moveFlagsAfterCommand args
cmdargsopts = processValue (mainmode addons) args'
cmdargsopts = either optserror id $ process (mainmode addons) args'
cmdargsopts' = decodeRawOpts cmdargsopts
rawOptsToCliOpts cmdargsopts'