diff options
-rw-r--r-- | src/Command/Run.hs | 2 | ||||
-rw-r--r-- | src/Output.hs | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/Command/Run.hs b/src/Command/Run.hs index 09a814e..0ea73b5 100644 --- a/src/Command/Run.hs +++ b/src/Command/Run.hs @@ -320,6 +320,8 @@ cmdRun (RunCommand RunOptions {..} args) = do Left err -> do forM_ (outputTerminal output) $ flip newLine $ "\ESC[91m" <> shortCid <> "\ESC[0m" <> " " <> shortDesc <> " \ESC[91m" <> T.pack err <> "\ESC[0m" + outputEvent output $ TestMessage $ "jobset-fail " <> T.pack err + outputEvent output $ LogMessage $ "Jobset failed: " <> shortCid <> " " <> T.pack err loop names (Just ( rest, next )) handle @SomeException (\_ -> cancelAllJobs mngr) $ do diff --git a/src/Output.hs b/src/Output.hs index 2dbaa3f..64704ec 100644 --- a/src/Output.hs +++ b/src/Output.hs @@ -41,6 +41,7 @@ data OutputType data OutputEvent = OutputMessage Text | TestMessage Text + | LogMessage Text | JobStarted JobId | JobFinished JobId Text @@ -97,6 +98,9 @@ outputEvent out@Output {..} = liftIO . \case TestMessage msg -> do forM_ outTest $ \h -> outStrLn out h msg + LogMessage msg -> do + forM_ outLogs $ \h -> outStrLn out h msg + JobStarted jid -> do forM_ outLogs $ \h -> outStrLn out h ("Started " <> textJobId jid) forM_ outTest $ \h -> outStrLn out h ("job-start " <> textJobId jid) |