Commit 6cf33f3
fix: Prevent `BASH_ENV` from overwriting the injected task `PATH`.
Non-interactive bash sources the file referenced by `BASH_ENV` on
startup, after the process environment has been applied. CI providers
like CircleCI persist environment variables between steps through this
file, so an `export PATH=...` within it would overwrite the `PATH`
that moon explicitly sets for task child processes, breaking lookup of
`node_modules` binaries and proto shims.
Strip `BASH_ENV` from bash wrapped child processes, unless it has been
explicitly set on the command (e.g. task `env`).
Closes #1998
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 5c16ccb commit 6cf33f3
2 files changed
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
| 400 | + | |
| 401 | + | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
406 | 407 | | |
407 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
408 | 423 | | |
409 | 424 | | |
410 | 425 | | |
| |||
0 commit comments