Skip to content

Commit 745c03c

Browse files
committed
Use untracked version of doesDirectoryExist in GitClone
1 parent ac429cc commit 745c03c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/Foliage/GitClone.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ module Foliage.GitClone (
1010
)
1111
where
1212

13-
import Development.Shake
13+
import Development.Shake hiding (doesDirectoryExist)
1414
import Development.Shake.Classes
1515
import Development.Shake.FilePath
1616
import Development.Shake.Rule
1717
import Foliage.Meta (GitHubRepo)
1818
import GHC.Generics (Generic)
19+
import System.Directory (doesDirectoryExist)
1920

2021
newtype GitClone = GitClone {repo :: GitHubRepo}
2122
deriving (Eq, Generic)
@@ -45,7 +46,7 @@ addGitCloneRule cacheDir = addBuiltinRule noLint noIdentity run
4546
run GitClone{repo} _old _mode = do
4647
let path = cacheDir </> "git" </> show repo
4748

48-
alreadyCloned <- doesDirectoryExist path
49+
alreadyCloned <- liftIO $ doesDirectoryExist path
4950
if alreadyCloned
5051
then command_ [Cwd path] "git" ["fetch"]
5152
else do

0 commit comments

Comments
 (0)