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:
parent
9508e02ad9
commit
e612633999
3 changed files with 10 additions and 4 deletions
|
@ -131,10 +131,12 @@ includeCommandAction a = account =<< tryNonAsync (callCommandAction a)
|
||||||
where
|
where
|
||||||
account (Right True) = return True
|
account (Right True) = return True
|
||||||
account (Right False) = incerr
|
account (Right False) = incerr
|
||||||
account (Left err) = do
|
account (Left err) = case fromException err of
|
||||||
toplevelWarning True (show err)
|
Just exitcode -> liftIO $ exitWith exitcode
|
||||||
implicitMessage showEndFail
|
Nothing -> do
|
||||||
incerr
|
toplevelWarning True (show err)
|
||||||
|
implicitMessage showEndFail
|
||||||
|
incerr
|
||||||
incerr = do
|
incerr = do
|
||||||
Annex.incError
|
Annex.incError
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -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
|
Note that was 7.20181105+git134-gf39db41d2 and i386
|
||||||
|
|
||||||
|
|
||||||
|
> [[fixed|done]] --[[Joey]]
|
||||||
|
|
|
@ -6,4 +6,7 @@
|
||||||
This is a reversion due to [[!commit 39fbaa0682198ba0fd8aa437b8382b13fb71e66f]]
|
This is a reversion due to [[!commit 39fbaa0682198ba0fd8aa437b8382b13fb71e66f]]
|
||||||
that breaks any part of a git-annex command that uses exitWith since that
|
that breaks any part of a git-annex command that uses exitWith since that
|
||||||
is actually implemented as an exception which now gets caught.
|
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.)
|
||||||
"""]]
|
"""]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue