File tree Expand file tree Collapse file tree 3 files changed +21
-5
lines changed
cabal-install/src/Distribution/Client Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,7 @@ withTempEnvFile verbosity baseCtx buildCtx buildStatus action = do
268268 action envOverrides
269269 )
270270
271+ -- | Get paths to all dependency executables to be included in PATH.
271272pathAdditions :: ProjectBaseContext -> ProjectBuildContext -> [FilePath ]
272273pathAdditions ProjectBaseContext {.. } ProjectBuildContext {.. } =
273274 paths ++ cabalConfigPaths
@@ -281,6 +282,7 @@ pathAdditions ProjectBaseContext{..} ProjectBuildContext{..} =
281282 S. toList $
282283 binDirectories distDirLayout elaboratedShared elaboratedPlanToExecute
283284
285+ -- | Get paths to all dependency executables to be included in PATH.
284286binDirectories
285287 :: DistDirLayout
286288 -> ElaboratedSharedConfig
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import Distribution.Client.ProjectPlanning
6060 )
6161import Distribution.Client.ProjectPlanning.Types
6262 ( dataDirsEnvironmentForPlan
63+ , elabExeDependencyPaths
6364 )
6465import Distribution.Client.ScriptUtils
6566 ( AcceptNoTargets (.. )
@@ -302,11 +303,13 @@ runAction flags@NixStyleFlags{..} targetAndArgs globalFlags =
302303 || buildSettingOnlyDownload (buildSettings baseCtx)
303304
304305 let extraPath =
305- fromNubList
306- . projectConfigProgPathExtra
307- . projectConfigShared
308- . projectConfig
309- $ baseCtx
306+ elabExeDependencyPaths pkg
307+ ++ ( fromNubList
308+ . projectConfigProgPathExtra
309+ . projectConfigShared
310+ . projectConfig
311+ $ baseCtx
312+ )
310313
311314 logExtraProgramSearchPath verbosity extraPath
312315
Original file line number Diff line number Diff line change 1+ synopsis: Fix run command environment
2+ packages: cabal-install
3+ prs: #9341
4+ issues: #8391
5+
6+ description: {
7+
8+ - The Run command will now add binary paths of dependencies
9+ (build-tool-depends) to PATH, just like Exec and Test commands.
10+
11+ }
You can’t perform that action at this time.
0 commit comments