avoid showing alert when there are no remotes to push to

This commit is contained in:
Joey Hess 2012-08-02 09:00:13 -04:00
parent 22d7447ced
commit 3695cab949

View file

@ -54,8 +54,9 @@ pushThread st dstatus commitchan pushmap = do
if shouldPush now commits
then do
remotes <- knownRemotes <$> getDaemonStatus dstatus
void $ alertWhile dstatus (pushAlert remotes) $
pushToRemotes thisThread now st (Just pushmap) remotes
unless (null remotes) $
void $ alertWhile dstatus (pushAlert remotes) $
pushToRemotes thisThread now st (Just pushmap) remotes
else do
debug thisThread
[ "delaying push of"