error if we check nothing

This commit is contained in:
amesgen 2021-01-02 08:51:57 +01:00
parent 53db68e39f
commit 5c43ff4c9e
No known key found for this signature in database
GPG Key ID: 1A89EC203635A13D

View File

@ -184,6 +184,7 @@ validateTarballs (TarballFilter tool versionRegex) dls = do
%& indices (maybe (const True) (==) tool) %> each
%& indices (matchTest versionRegex . T.unpack . prettyVer)
% (viSourceDL % _Just `summing` viArch % each % each % each)
when (null dlis) $ $(logError) [i|no tarballs selected by filter|] *> addError
forM_ dlis $ downloadAll
-- exit
@ -195,13 +196,13 @@ validateTarballs (TarballFilter tool versionRegex) dls = do
pure ExitSuccess
where
downloadAll dli = do
dirs <- liftIO getDirs
let settings = AppState (Settings True False Never Curl False GHCupURL) dirs defaultKeyBindings
let runLogger = myLoggerT LoggerConfig { lcPrintDebug = True
runLogger = myLoggerT LoggerConfig { lcPrintDebug = True
, colorOutter = B.hPut stderr
, rawOutter = (\_ -> pure ())
}
downloadAll dli = do
dirs <- liftIO getDirs
let settings = AppState (Settings True False Never Curl False GHCupURL) dirs defaultKeyBindings
r <-
runLogger