summaryrefslogtreecommitdiff
path: root/src/Propellor/Engine.hs
diff options
context:
space:
mode:
authorJoey Hess2014-11-21 23:33:39 -0400
committerJoey Hess2014-11-21 23:33:39 -0400
commit6eb64d56e3718339b209853b838d04606dcd2dbb (patch)
tree3e11f9f609638eb8b42e4a3c640d14fd2c2b47dd /src/Propellor/Engine.hs
parent0c39e3137d185fb24e26ed60c112ed72811e002e (diff)
avoid setting title when not at console
Diffstat (limited to 'src/Propellor/Engine.hs')
-rw-r--r--src/Propellor/Engine.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Propellor/Engine.hs b/src/Propellor/Engine.hs
index 0a51736f..b551ca05 100644
--- a/src/Propellor/Engine.hs
+++ b/src/Propellor/Engine.hs
@@ -27,7 +27,9 @@ mainProperties :: Host -> IO ()
mainProperties host = do
r <- runPropellor host $
ensureProperties [Property "overall" (ensureProperties $ hostProperties host) mempty]
- setTitle "propellor: done"
+ h <- mkMessageHandle
+ whenConsole h $
+ setTitle "propellor: done"
hFlush stdout
case r of
FailedChange -> exitWith (ExitFailure 1)