simplify checkIfToolInstalled for Cabal

This commit is contained in:
Arjun Kathuria 2021-09-07 14:22:21 +05:30
parent 7a6a119829
commit d60f58cf43

View File

@ -476,12 +476,7 @@ checkIfToolInstalled tool ver = do
Dirs { binDir } <- getDirs
case tool of
Cabal -> do
v <- cabalInstalled ver
liftIO $ handleIO (\_ -> pure False)
$ fmap (\x -> v && x)
$ pathIsLink (binDir </> "cabal" <> exeExt)
Cabal -> cabalInstalled ver
_ -> pure False
-- | Install an unpacked cabal distribution.Symbol