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
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue