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
268
268
action envOverrides
269
269
)
270
270
271
+ -- | Get paths to all dependency executables to be included in PATH.
271
272
pathAdditions :: ProjectBaseContext -> ProjectBuildContext -> [FilePath ]
272
273
pathAdditions ProjectBaseContext {.. } ProjectBuildContext {.. } =
273
274
paths ++ cabalConfigPaths
@@ -281,6 +282,7 @@ pathAdditions ProjectBaseContext{..} ProjectBuildContext{..} =
281
282
S. toList $
282
283
binDirectories distDirLayout elaboratedShared elaboratedPlanToExecute
283
284
285
+ -- | Get paths to all dependency executables to be included in PATH.
284
286
binDirectories
285
287
:: DistDirLayout
286
288
-> ElaboratedSharedConfig
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import Distribution.Client.ProjectPlanning
60
60
)
61
61
import Distribution.Client.ProjectPlanning.Types
62
62
( dataDirsEnvironmentForPlan
63
+ , elabExeDependencyPaths
63
64
)
64
65
import Distribution.Client.ScriptUtils
65
66
( AcceptNoTargets (.. )
@@ -302,11 +303,13 @@ runAction flags@NixStyleFlags{..} targetAndArgs globalFlags =
302
303
|| buildSettingOnlyDownload (buildSettings baseCtx)
303
304
304
305
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
+ )
310
313
311
314
logExtraProgramSearchPath verbosity extraPath
312
315
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