Skip to content

fix(bash): compose plugin PATH instead of stomping system PATH#21774

Open
micuintus wants to merge 1 commit intoanomalyco:devfrom
micuintus:fix/path-composition
Open

fix(bash): compose plugin PATH instead of stomping system PATH#21774
micuintus wants to merge 1 commit intoanomalyco:devfrom
micuintus:fix/path-composition

Conversation

@micuintus
Copy link
Copy Markdown

@micuintus micuintus commented Apr 9, 2026

Issue for this PR

Closes #21768

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Fixes PATH handling in shellEnv(). When plugins returned PATH entries via the shell.env hook, the spread ...extra.env stomped the system PATH entirely — commands like ls and git broke because /usr/bin was gone.

Now plugin PATH entries are extracted before the spread, then prepended to process.env.PATH so both plugin binaries and system commands work.

How did you verify your code works?

  • Manual testing: confirmed plugin binaries are found AND system commands still work
  • bun turbo typecheck passes

Screenshots / recordings

No UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Part of the plugin primitives work split from #21687 (tracking issue #20018).

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Apr 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@micuintus micuintus force-pushed the fix/path-composition branch from 9576b15 to a498f63 Compare April 9, 2026 22:05
When plugins return PATH entries via the shell.env hook, prepend them
to the existing system PATH instead of replacing it entirely. This
preserves standard paths like /usr/bin.
@micuintus micuintus force-pushed the fix/path-composition branch from a498f63 to 810fba1 Compare April 9, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(bash): compose plugin PATH instead of stomping system PATH

1 participant