Skip to content

fix(bridge): preserve caller mix paths - #6

Merged
dannote merged 1 commit into
elixir-vibe:masterfrom
lATAl:fix/preserve-caller-mix-paths
Sep 13, 2026
Merged

dannote merged 1 commit into
elixir-vibe:masterfrom
lATAl:fix/preserve-caller-mix-paths

Conversation

@lATAl

@lATAl lATAl commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem

mixChildEnv overrides MIX_HOME and MIX_ARCHIVES with paths under ~/.mix, discarding the caller's environment.

This breaks Mix archive isolation provided by version managers such as mise. In a reproduced setup, mise supplied a Mix home for OTP 28, but the bridge used the shared directory containing a Hex archive built for OTP 27. mix deps.get failed with a bs_add opcode error, preventing the embedded bridge from starting.

Changes

  • Preserve MIX_HOME and MIX_ARCHIVES inherited from process.env.
  • Let Mix use its default paths when these variables are unset.
  • Keep the bridge-specific MIX_ENV and PI_ELIXIR_PROJECT_CWD settings.
  • Remove the unused node:os and node:path imports.
  • Extend the startup regression test to assert that both mix deps.get and mix run receive the caller's Mix paths.

@dannote
dannote merged commit 756cb1e into elixir-vibe:master Sep 13, 2026
1 check passed
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.

2 participants