diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-07-05 14:03:07 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-07-05 14:03:07 -0400 |
| commit | 9d6c50fff28ed5ba7da7fdd2989c7773e357a3c3 (patch) | |
| tree | 6fba6644518aecd6fedfde5c42fbe01783f37aab /src/Propellor/Message.hs | |
| parent | 05b0648e0be87700ecd7ce3a36c966aa96beff7b (diff) | |
| parent | e77e60604ac908e0895af202e83a47096d60b059 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Message.hs')
| -rw-r--r-- | src/Propellor/Message.hs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/Propellor/Message.hs b/src/Propellor/Message.hs index c56f0c5a..7715088f 100644 --- a/src/Propellor/Message.hs +++ b/src/Propellor/Message.hs @@ -14,7 +14,6 @@ module Propellor.Message ( infoMessage, errorMessage, stopPropellorMessage, - processChainOutput, messagesDone, createProcessConcurrent, withConcurrentOutput, @@ -31,7 +30,6 @@ import Prelude import Propellor.Types import Propellor.Types.Exception -import Utility.PartialPrelude import Utility.Monad import Utility.Exception @@ -142,27 +140,6 @@ colorLine intensity color msg = concat <$> sequence , pure "\n" ] --- | Reads and displays each line from the Handle, except for the last line --- which is a Result. -processChainOutput :: Handle -> IO Result -processChainOutput h = go Nothing - where - go lastline = do - v <- catchMaybeIO (hGetLine h) - case v of - Nothing -> case lastline of - Nothing -> do - return FailedChange - Just l -> case readish l of - Just r -> pure r - Nothing -> do - outputConcurrent (l ++ "\n") - return FailedChange - Just s -> do - outputConcurrent $ - maybe "" (\l -> if null l then "" else l ++ "\n") lastline - go (Just s) - -- | Called when all messages about properties have been printed. messagesDone :: IO () messagesDone = outputConcurrent |
