avoid setting title when not at console

This commit is contained in:
Joey Hess 2014-11-21 23:33:39 -04:00
parent 0c39e3137d
commit 6eb64d56e3
1 changed files with 3 additions and 1 deletions

View File

@ -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)