error if we check nothing
This commit is contained in:
parent
53db68e39f
commit
5c43ff4c9e
@ -184,6 +184,7 @@ validateTarballs (TarballFilter tool versionRegex) dls = do
|
|||||||
%& indices (maybe (const True) (==) tool) %> each
|
%& indices (maybe (const True) (==) tool) %> each
|
||||||
%& indices (matchTest versionRegex . T.unpack . prettyVer)
|
%& indices (matchTest versionRegex . T.unpack . prettyVer)
|
||||||
% (viSourceDL % _Just `summing` viArch % each % each % each)
|
% (viSourceDL % _Just `summing` viArch % each % each % each)
|
||||||
|
when (null dlis) $ $(logError) [i|no tarballs selected by filter|] *> addError
|
||||||
forM_ dlis $ downloadAll
|
forM_ dlis $ downloadAll
|
||||||
|
|
||||||
-- exit
|
-- exit
|
||||||
@ -195,13 +196,13 @@ validateTarballs (TarballFilter tool versionRegex) dls = do
|
|||||||
pure ExitSuccess
|
pure ExitSuccess
|
||||||
|
|
||||||
where
|
where
|
||||||
downloadAll dli = do
|
runLogger = myLoggerT LoggerConfig { lcPrintDebug = True
|
||||||
dirs <- liftIO getDirs
|
|
||||||
let settings = AppState (Settings True False Never Curl False GHCupURL) dirs defaultKeyBindings
|
|
||||||
let runLogger = myLoggerT LoggerConfig { lcPrintDebug = True
|
|
||||||
, colorOutter = B.hPut stderr
|
, colorOutter = B.hPut stderr
|
||||||
, rawOutter = (\_ -> pure ())
|
, rawOutter = (\_ -> pure ())
|
||||||
}
|
}
|
||||||
|
downloadAll dli = do
|
||||||
|
dirs <- liftIO getDirs
|
||||||
|
let settings = AppState (Settings True False Never Curl False GHCupURL) dirs defaultKeyBindings
|
||||||
|
|
||||||
r <-
|
r <-
|
||||||
runLogger
|
runLogger
|
||||||
|
Loading…
Reference in New Issue
Block a user