Skip to content

fix: use active node npm for wrapper updates#33

Merged
cafitac merged 1 commit intomainfrom
fix/wrapper-update-uses-active-node-npm
Apr 28, 2026
Merged

fix: use active node npm for wrapper updates#33
cafitac merged 1 commit intomainfrom
fix/wrapper-update-uses-active-node-npm

Conversation

@cafitac
Copy link
Copy Markdown
Owner

@cafitac cafitac commented Apr 28, 2026

Summary

  • make agent-learner update prefer the npm executable next to the active node
  • fall back to plain npm only when no sibling executable exists
  • add a regression test covering the active-node npm selection

Problem

When the wrapper shelles out to bare npm, non-interactive/login shells can resolve a different Node/npm tree than the active wrapper binary. In this environment that caused agent-learner to live under ~/.nvm/... while npm install -g targeted /usr/local, leading to permission errors and inconsistent updates.

Test Plan

  • node --test test/wrapper.test.cjs
  • npm test

@cafitac cafitac force-pushed the fix/wrapper-update-uses-active-node-npm branch from 6ff30e8 to 4c897d3 Compare April 28, 2026 12:01
@cafitac cafitac merged commit 4bdd238 into main Apr 28, 2026
6 checks passed
@cafitac cafitac deleted the fix/wrapper-update-uses-active-node-npm branch April 28, 2026 12:03
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.

1 participant