imp: cleaner error messages when parsing cli (less "user error")

This commit is contained in:
Simon Michael 2022-01-30 09:34:10 -10:00
parent a22068a556
commit 336c4a7b33

View File

@ -489,7 +489,7 @@ rawOptsToCliOpts rawopts = do
Just d -> fromRight (error' $ "Unable to parse date \"" ++ d ++ "\"") -- PARTIAL: Just d -> fromRight (error' $ "Unable to parse date \"" ++ d ++ "\"") -- PARTIAL:
$ fixSmartDateStrEither' currentDay (T.pack d) $ fixSmartDateStrEither' currentDay (T.pack d)
let iopts = rawOptsToInputOpts day rawopts let iopts = rawOptsToInputOpts day rawopts
rspec <- either fail pure $ rawOptsToReportSpec day rawopts -- PARTIAL: rspec <- either error' pure $ rawOptsToReportSpec day rawopts -- PARTIAL:
mcolumns <- readMay <$> getEnvSafe "COLUMNS" mcolumns <- readMay <$> getEnvSafe "COLUMNS"
mtermwidth <- mtermwidth <-
#ifdef mingw32_HOST_OS #ifdef mingw32_HOST_OS