summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-03-02 14:09:42 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-03-02 14:09:42 -0400
commitd7d27ae4bb6ef2e421545c59209fdf4576b4be3b (patch)
treeed43ccb8f142d480fce4059ccd56dde60a038088 /Command
parent544e6792d712f2e90e25776b3761e1c6d32e3059 (diff)
status: Propigate nonzero exit code from git status.
Diffstat (limited to 'Command')
-rw-r--r--Command/Status.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Command/Status.hs b/Command/Status.hs
index 2e6b9f44a..07024f3c8 100644
--- a/Command/Status.hs
+++ b/Command/Status.hs
@@ -47,8 +47,10 @@ start o locs = do
, return $ \s -> pure (Just s)
)
forM_ l $ \s -> maybe noop displayStatus =<< getstatus s
- void $ liftIO cleanup
- stop
+ ifM (liftIO cleanup)
+ ( stop
+ , giveup "git status failed"
+ )
where
ps = case ignoreSubmodules o of
Nothing -> []