File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
cabal-install-solver/src/Distribution/Solver/Types Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -70,12 +70,12 @@ readPkgConfigDb verbosity progdb = handle ioErrorHandler $ do
70
70
(pkgVersions, _errs, exitCode) <-
71
71
getProgramInvocationOutputAndErrors verbosity
72
72
(programInvocation pkgConfig (" --modversion" : pkgNames))
73
- case exitCode of
74
- ExitSuccess -> (return . pkgConfigDbFromList . zip pkgNames) (lines pkgVersions)
75
- -- if there's a single broken pc file the above fails, so we fall back into calling it individually
76
- _ -> do
77
- info verbosity (" call to pkg-config --modversion on all packages failed. Falling back to querying pkg-config individually on each package" )
78
- pkgConfigDbFromList . catMaybes <$> mapM (getIndividualVersion pkgConfig) pkgNames
73
+ if exitCode == ExitSuccess && length pkgNames == length pkgList
74
+ then (return . pkgConfigDbFromList . zip pkgNames) (lines pkgVersions)
75
+ else -- if there's a single broken pc file the above fails, so we fall back into calling it individually
76
+ do
77
+ info verbosity (" call to pkg-config --modversion on all packages failed. Falling back to querying pkg-config individually on each package" )
78
+ pkgConfigDbFromList . catMaybes <$> mapM (getIndividualVersion pkgConfig) pkgNames
79
79
where
80
80
-- For when pkg-config invocation fails (possibly because of a
81
81
-- too long command line).
You can’t perform that action at this time.
0 commit comments