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

View file

@ -31,3 +31,4 @@ So it is `All 293 tests passed (264.37s)` but then some additional test fails
Note that was 7.20181105+git134-gf39db41d2 and i386
> [[fixed|done]] --[[Joey]]

View file

@ -6,4 +6,7 @@
This is a reversion due to [[!commit 39fbaa0682198ba0fd8aa437b8382b13fb71e66f]]
that breaks any part of a git-annex command that uses exitWith since that
is actually implemented as an exception which now gets caught.
(Seems that when I tried the test suite after that commit I stopped reading
at the "All 293 tests passed" because it does always go on to fail.)
"""]]