From 60e72a769b4aa1b812114231de4e89d18023cd46 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Fri, 21 Feb 2025 16:51:18 +0000 Subject: [PATCH] cabal-install: Fix the directory the build folder is created in Clearly this path needs to be relative to the CWD, and the correct offset is passed as the `srcdir` parameter. Fixes #10772 --- .../Client/ProjectBuilding/UnpackedPackage.hs | 2 +- changelog.d/pr-10800 | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 changelog.d/pr-10800 diff --git a/cabal-install/src/Distribution/Client/ProjectBuilding/UnpackedPackage.hs b/cabal-install/src/Distribution/Client/ProjectBuilding/UnpackedPackage.hs index 1d2a86bea46..e19c52157c0 100644 --- a/cabal-install/src/Distribution/Client/ProjectBuilding/UnpackedPackage.hs +++ b/cabal-install/src/Distribution/Client/ProjectBuilding/UnpackedPackage.hs @@ -459,7 +459,7 @@ buildInplaceUnpackedPackage -- TODO: [code cleanup] there is duplication between the -- distdirlayout and the builddir here builddir is not -- enough, we also need the per-package cachedir - createDirectoryIfMissingVerbose verbosity True $ getSymbolicPath builddir + createDirectoryIfMissingVerbose verbosity True $ interpretSymbolicPath (Just srcdir) builddir createDirectoryIfMissingVerbose verbosity True diff --git a/changelog.d/pr-10800 b/changelog.d/pr-10800 new file mode 100644 index 00000000000..5c92176dc30 --- /dev/null +++ b/changelog.d/pr-10800 @@ -0,0 +1,12 @@ +synopsis: Fix regression where 'build' folder was created in CWD when running a standlone script. +packages: cabal-install +prs: #10800 +issues: #10772 +significance: + +description: { + +Fix a regression where the `build` folder was created in the current directory +when running a standalone script. + +}