@@ -476,6 +476,7 @@ configureCompiler
476
476
{ projectConfigHcFlavor
477
477
, projectConfigHcPath
478
478
, projectConfigHcPkg
479
+ , projectConfigProgPathExtra
479
480
}
480
481
, projectConfigLocalPackages =
481
482
PackageConfig
@@ -500,24 +501,26 @@ configureCompiler
500
501
$ do
501
502
liftIO $ info verbosity " Compiler settings changed, reconfiguring..."
502
503
let extraPath = fromNubList packageConfigProgramPathExtra
504
+ -- Add paths in the local config
503
505
progdb <- liftIO $ prependProgramSearchPath verbosity extraPath [] defaultProgramDb
504
- let progdb' = userSpecifyPaths (Map. toList (getMapLast packageConfigProgramPaths)) progdb
505
- result@ (_, _, progdb'') <-
506
+ -- Add paths in the global config
507
+ progdb' <- liftIO $ prependProgramSearchPath verbosity (fromNubList projectConfigProgPathExtra) [] progdb
508
+ let progdb'' = userSpecifyPaths (Map. toList (getMapLast packageConfigProgramPaths)) progdb'
509
+ result@ (_, _, progdb''') <-
506
510
liftIO $
507
511
Cabal. configCompilerEx
508
512
hcFlavor
509
513
hcPath
510
514
hcPkg
511
- progdb'
515
+ progdb''
512
516
verbosity
513
-
514
517
-- Note that we added the user-supplied program locations and args
515
518
-- for /all/ programs, not just those for the compiler prog and
516
519
-- compiler-related utils. In principle we don't know which programs
517
520
-- the compiler will configure (and it does vary between compilers).
518
521
-- We do know however that the compiler will only configure the
519
522
-- programs it cares about, and those are the ones we monitor here.
520
- monitorFiles (programsMonitorFiles progdb'')
523
+ monitorFiles (programsMonitorFiles progdb''' )
521
524
522
525
-- Note: There is currently a bug here: we are dropping unconfigured
523
526
-- programs from the 'ProgramDb' when we re-use the cache created by
0 commit comments