rethrow ExitStatus exceptions

Several git-annex commands want to exit right away, but that's an
exception, which is caught due to 39fbaa0682.
So, re-throw it.
This commit is contained in:
Joey Hess 2018-11-19 13:18:08 -04:00
parent 9508e02ad9
commit e612633999
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 10 additions and 4 deletions

View file

@ -131,10 +131,12 @@ includeCommandAction a = account =<< tryNonAsync (callCommandAction a)
where
account (Right True) = return True
account (Right False) = incerr
account (Left err) = do
toplevelWarning True (show err)
implicitMessage showEndFail
incerr
account (Left err) = case fromException err of
Just exitcode -> liftIO $ exitWith exitcode
Nothing -> do
toplevelWarning True (show err)
implicitMessage showEndFail
incerr
incerr = do
Annex.incError
return False