diff options
-rw-r--r-- | Command/Watch.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Command/Watch.hs b/Command/Watch.hs index f01a9616f..76f03a097 100644 --- a/Command/Watch.hs +++ b/Command/Watch.hs @@ -142,11 +142,10 @@ runStateMVar mvar a = do - Exceptions are ignored, otherwise a whole watcher thread could be crashed. -} runHandler :: MVar Annex.AnnexState -> ChangeChan -> Handler -> FilePath -> IO () -runHandler st changechan hook file = handle =<< tryIO (runStateMVar st go) +runHandler st changechan handler file = + either (putStrLn . show) return =<< tryIO (runStateMVar st go) where - go = maybe noop (signalChange changechan) =<< hook file - handle (Right ()) = return () - handle (Left e) = putStrLn $ show e + go = maybe noop (signalChange changechan) =<< handler file {- Handlers call this when they made a change that needs to get committed. -} madeChange :: FilePath -> String -> Annex (Maybe Change) |