status: Propigate nonzero exit code from git status.

This commit is contained in:
Joey Hess 2017-03-02 14:09:42 -04:00
parent e4bcfcb618
commit 874232f1a6
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
3 changed files with 18 additions and 2 deletions

View file

@ -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 -> []