Skip to content

Commit

Permalink
don't create a cache directory when the compiler isn't configured (#8627
Browse files Browse the repository at this point in the history
)

* don't create a cache directory when the compiler isn't configured

* Update pr-8358

Co-authored-by: Gershom Bazerman <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 4, 2023
1 parent 6467407 commit d165b30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cabal-install/src/Distribution/Client/ProjectPlanning.hs
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,10 @@ rebuildProjectConfig verbosity
fileMonitorProjectConfigKey -- todo check deps too?
$ do
liftIO $ info verbosity "Project settings changed, reconfiguring..."
liftIO $ createDirectoryIfMissingVerbose verbosity True distProjectCacheDirectory
projectConfigSkeleton <- phaseReadProjectConfig
-- have to create the cache directory before configuring the compiler
let fetchCompiler = do
-- have to create the cache directory before configuring the compiler
liftIO $ createDirectoryIfMissingVerbose verbosity True distProjectCacheDirectory
(compiler, Platform arch os, _) <- configureCompiler verbosity distDirLayout ((fst $ PD.ignoreConditions projectConfigSkeleton) <> cliConfig)
pure (os, arch, compilerInfo compiler)

Expand Down
4 changes: 2 additions & 2 deletions changelog.d/pr-8358
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
synopsis: Update and sdist now only check for compiler when project file has conditionals
packages: cabal-install
prs: #8358
issues: #8352
prs: #8358 #8627
issues: #8352 #8550 #8589

description: {

Expand Down

0 comments on commit d165b30

Please sign in to comment.