Skip to content

Commit 276512f

Browse files
committed
in-library: set pkgDescrFile
1 parent 90cab81 commit 276512f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

cabal-install/src/Distribution/Client/InLibrary.hs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,19 @@ configure
216216
OneComponentRequestedSpec{} -> True
217217
ComponentRequestedSpec{} -> False
218218
externalPkgDeps <- Cabal.configureDependencies verbosity useExternalInternalDeps pkg_info pkg_descr compRequested
219-
lbi <- Cabal.configureComponents lbc2 pbd3 installedPkgs promisedDeps externalPkgDeps
219+
lbi1 <- Cabal.configureComponents lbc2 pbd3 installedPkgs promisedDeps externalPkgDeps
220+
221+
pkgDescrFile <-
222+
case configCabalFilePath cfg of
223+
Just pkgFile -> return pkgFile
224+
Nothing -> relativeSymbolicPath <$> tryFindPackageDesc verbosity cwd
225+
let lbi2 = lbi1 { pkgDescrFile = configCabalFilePath cfg }
226+
220227
-- Write the LocalBuildInfo to disk. This is needed, for instance, if we
221228
-- skip re-configuring; we retrieve the LocalBuildInfo stored on disk from
222229
-- the previous invocation of 'configure' and pass it to 'build'.
223-
Cabal.writePersistBuildConfig mbWorkDir distPref lbi
224-
return lbi
230+
Cabal.writePersistBuildConfig mbWorkDir distPref lbi2
231+
return lbi2
225232

226233
wantComponent :: ComponentRequestedSpec -> Component -> Bool
227234
wantComponent compReq comp = case compReq of

0 commit comments

Comments
 (0)