summaryrefslogtreecommitdiff
path: root/src/Repo.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Repo.hs')
-rw-r--r--src/Repo.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Repo.hs b/src/Repo.hs
index 9fab2f7..fbcded0 100644
--- a/src/Repo.hs
+++ b/src/Repo.hs
@@ -489,7 +489,8 @@ readCommittedFile Tree {..} path = do
pushToBranch :: (MonadIO m, MonadFail m) => Branch -> Commit -> m ()
pushToBranch Branch {..} Commit {..} = do
when (not $ gitWritable branchRepo) $ do
- fail $ "repo ‘" <> gitDir branchRepo <> "’ is not writable"
+ -- throw IO exception to generate JobError instead of JobFailed
+ liftIO $ fail $ "repo ‘" <> gitDir branchRepo <> "’ is not writable"
join $ liftIO $
withMVar (gitLock branchRepo) $ \_ ->
withMVar (gitLock commitRepo) $ \_ -> do