From 5f9159aaf4573f903634a3d137aafa70b29d2872 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Thu, 30 Jan 2020 20:16:01 +0100 Subject: [PATCH] Use throwError where possible instead of fail --- lib/GHup.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/GHup.hs b/lib/GHup.hs index 5890037..32834d6 100644 --- a/lib/GHup.hs +++ b/lib/GHup.hs @@ -254,7 +254,7 @@ deleteFork :: AuthMethod am deleteFork am owner repo = runExceptT $ do (withExceptT show $ ExceptT $ github' (repositoryR owner repo)) >>= \case (Repo { repoFork = Just True }) -> pure () - _ -> fail "Not a fork" + _ -> throwError "Not a fork" withExceptT show $ ExceptT $ github am (deleteRepoR owner repo)