File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Cabal/src/Distribution/Simple Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1071,7 +1071,13 @@ reusingGHCCompilationArtifacts verbosity tmpFileOpts mbWorkDir lbi bi clbi versi
1071
1071
let
1072
1072
vanillaOpts = componentGhcOptions normal lbi bi clbi (buildDir lbi)
1073
1073
i = interpretSymbolicPath mbWorkDir
1074
- copyDir ghcDir tmpDir = copyDirectoryRecursive verbosity (i $ fromFlag $ ghcDir vanillaOpts) (i tmpDir)
1074
+ copyDir getGhcDir tmpDir = do
1075
+ let ghcDir = i $ fromFlag $ getGhcDir vanillaOpts
1076
+ ghcDirExists <- doesDirectoryExist ghcDir
1077
+ -- Don't try to copy artifacts if they don't exist, e.g. if
1078
+ -- we have not yet run the 'build' command.
1079
+ when ghcDirExists $
1080
+ copyDirectoryRecursive verbosity ghcDir (i tmpDir)
1075
1081
copyDir ghcOptObjDir tmpObjDir
1076
1082
copyDir ghcOptHiDir tmpHiDir
1077
1083
-- copyDir ghcOptStubDir tmpStubDir -- (see W.1 in Note [Hi Haddock Recompilation Avoidance])
You can’t perform that action at this time.
0 commit comments