GitLab maintenance scheduled for Tomorrow, 2019-09-24, from 12:00 to 13:00 CT - Services will be unavailable during this time.

Commit 646d42f7 authored by Valentin Reis's avatar Valentin Reis

[feature] improved output command printing.

parent 7e61d525
Pipeline #4749 passed with stage
in 14 seconds
......@@ -16,6 +16,7 @@ import Options.Applicative
import System.Posix.Signals
import Control.Monad
import Data.Either
import Data.Maybe
opts :: StackArgs -> Parser (IO ())
opts sa = hsubparser
......@@ -86,7 +87,14 @@ runStack a@StackArgs {..} = sh $ runSimpleStack a >>= \case
FoundMessage -> printSuccess "Found message!\n" >> exit ExitSuccess
DaemonDied ->
printError "Daemon died unexpectedly.\n" >> exit (ExitFailure 1)
CmdDied -> printError "Did not find message.\n" >> exit (ExitFailure 1)
CmdDied -> do
when
( or
$ isJust
<$> [messageDaemonOut, messageDaemonErr, messageCmdOut, messageCmdErr]
)
$ printError "Did not find message.\n"
exit (ExitFailure 1)
runClean :: StackArgs -> IO ()
runClean = sh . cleanLeftovers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment