We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 937cdd3 commit 2e519edCopy full SHA for 2e519ed
src/Stack/Setup.hs
@@ -490,7 +490,12 @@ getGhcBuild menv = do
490
platform <- asks getPlatform
491
case platform of
492
Platform _ Linux -> do
493
- eldconfigOut <- tryProcessStdout Nothing menv "ldconfig" ["-p"]
+ -- Some systems don't have ldconfig in the PATH, so make sure to look in /sbin and /usr/sbin as well
494
+ sbinEnv <- modifyEnvOverride menv $
495
+ Map.insert "PATH" $
496
+ "/sbin:/usr/sbin" <>
497
+ (maybe "" (":" <>) $ Map.lookup "PATH" (eoTextMap menv))
498
+ eldconfigOut <- tryProcessStdout Nothing sbinEnv "ldconfig" ["-p"]
499
let firstWords = case eldconfigOut of
500
Right ldconfigOut -> mapMaybe (headMay . T.words) $
501
T.lines $ T.decodeUtf8With T.lenientDecode ldconfigOut
0 commit comments