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 ...@@ -16,6 +16,7 @@ import Options.Applicative
import System.Posix.Signals import System.Posix.Signals
import Control.Monad import Control.Monad
import Data.Either import Data.Either
import Data.Maybe
opts :: StackArgs -> Parser (IO ()) opts :: StackArgs -> Parser (IO ())
opts sa = hsubparser opts sa = hsubparser
...@@ -86,7 +87,14 @@ runStack a@StackArgs {..} = sh $ runSimpleStack a >>= \case ...@@ -86,7 +87,14 @@ runStack a@StackArgs {..} = sh $ runSimpleStack a >>= \case
FoundMessage -> printSuccess "Found message!\n" >> exit ExitSuccess FoundMessage -> printSuccess "Found message!\n" >> exit ExitSuccess
DaemonDied -> DaemonDied ->
printError "Daemon died unexpectedly.\n" >> exit (ExitFailure 1) 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 :: StackArgs -> IO ()
runClean = sh . cleanLeftovers 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