summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2014-03-31 18:36:53 -0400
committerJoey Hess2014-03-31 18:36:53 -0400
commiteb78bbae190a0f820d6e16561fb03307eea9e4d4 (patch)
tree8bfdd16ca967fe9f9e823012354e5263bab6b5fc
parentc246a8ee745723140150c8b8d35b7a7121c90c11 (diff)
propellor spin
-rw-r--r--Propellor/CmdLine.hs2
-rw-r--r--Propellor/Message.hs5
-rw-r--r--Propellor/Types.hs4
3 files changed, 4 insertions, 7 deletions
diff --git a/Propellor/CmdLine.hs b/Propellor/CmdLine.hs
index a5ce9dda..22a014af 100644
--- a/Propellor/CmdLine.hs
+++ b/Propellor/CmdLine.hs
@@ -147,7 +147,7 @@ spin host = do
]
, "else " ++ intercalate " && "
[ "cd " ++ localdir
- --, "if ! test -x ./propellor; then make build; fi"
+ , "if ! test -x ./propellor; then make build; fi"
, "./propellor --boot " ++ host
]
, "fi"
diff --git a/Propellor/Message.hs b/Propellor/Message.hs
index a7ceff91..198272e7 100644
--- a/Propellor/Message.hs
+++ b/Propellor/Message.hs
@@ -10,13 +10,12 @@ import Propellor.Types
actionMessage :: ActionResult r => Desc -> IO r -> IO r
actionMessage desc a = do
setTitle desc
- showdesc
- putStrLn "starting"
hFlush stdout
r <- a
let (msg, intensity, color) = getActionResult r
+ putStr $ desc ++ " ... "
showdesc
setSGR [SetColor Foreground intensity color]
putStrLn msg
@@ -24,8 +23,6 @@ actionMessage desc a = do
hFlush stdout
return r
- where
- showdesc = putStr $ desc ++ " ... "
warningMessage :: String -> IO ()
warningMessage s = do
diff --git a/Propellor/Types.hs b/Propellor/Types.hs
index 5874863c..00ddbd98 100644
--- a/Propellor/Types.hs
+++ b/Propellor/Types.hs
@@ -30,8 +30,8 @@ class ActionResult a where
getActionResult :: a -> (String, ColorIntensity, Color)
instance ActionResult Bool where
- getActionResult False = ("ok", Vivid, Red)
- getActionResult True = ("failed", Vivid, Green)
+ getActionResult False = ("failed", Vivid, Red)
+ getActionResult True = ("ok", Vivid, Green)
instance ActionResult Result where
getActionResult NoChange = ("unchanged", Dull, Green)