From 46b371dc825f23673e309fe25bbab42def611186 Mon Sep 17 00:00:00 2001 From: Sebastian Nagel Date: Mon, 13 Nov 2023 16:02:30 +0100 Subject: [PATCH] Use untracked version of doesDirectoryExist in GitClone --- app/Foliage/GitClone.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Foliage/GitClone.hs b/app/Foliage/GitClone.hs index 0d57907..c16bcb8 100644 --- a/app/Foliage/GitClone.hs +++ b/app/Foliage/GitClone.hs @@ -10,12 +10,13 @@ module Foliage.GitClone ( ) where -import Development.Shake +import Development.Shake hiding (doesDirectoryExist) import Development.Shake.Classes import Development.Shake.FilePath import Development.Shake.Rule import Foliage.Meta (GitHubRepo) import GHC.Generics (Generic) +import System.Directory (doesDirectoryExist) newtype GitClone = GitClone {repo :: GitHubRepo} deriving (Eq, Generic) @@ -45,7 +46,7 @@ addGitCloneRule cacheDir = addBuiltinRule noLint noIdentity run run GitClone{repo} _old _mode = do let path = cacheDir "git" show repo - alreadyCloned <- doesDirectoryExist path + alreadyCloned <- liftIO $ doesDirectoryExist path if alreadyCloned then command_ [Cwd path] "git" ["fetch"] else do