diff options
Diffstat (limited to 'Command/InAnnex.hs')
-rw-r--r-- | Command/InAnnex.hs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Command/InAnnex.hs b/Command/InAnnex.hs index 9c169d0d7..c41f9a92c 100644 --- a/Command/InAnnex.hs +++ b/Command/InAnnex.hs @@ -19,8 +19,9 @@ seek :: [CommandSeek] seek = [withKeys start] start :: Key -> CommandStart -start key = do - present <- inAnnex key - if present - then stop - else liftIO exitFailure +start key = inAnnexSafe key >>= dispatch + where + dispatch (Just True) = stop + dispatch (Just False) = exit 1 + dispatch Nothing = exit 100 + exit n = liftIO $ exitWith $ ExitFailure n |