Skip to content

fix(mise): login shells put the shims first, not merely on PATH - #50

Merged
garygentry merged 1 commit into
mainfrom
fix/mise-shims-first-login
Sep 27, 2026
Merged

garygentry merged 1 commit into
mainfrom
fix/mise-shims-first-login

Conversation

@garygentry

Copy link
Copy Markdown
Owner

Found by the Track 8 Phase 6 node canary (nodejs.provider: mise on hal). nodejs verify.sh failed with login shell's node is ~/.local/bin/node, not under ~/.local/share/mise.

Cause. The stock Ubuntu ~/.profile sources ~/.bashrc first. The mise block at the top of ~/.bashrc adds the shims, then the stock lines prepend ~/.local/bin. The ~/.profile mise block only acted when the shims were absent, so they stayed second. Every stale ~/.local/bin copy won in login bash (the reconcile timer's shell): the tarball node, an old starship. zsh was unaffected because .zshenv uses path=(shims $path) with typeset -U.

Fix. The POSIX block prepends unless the shims are already first. A later duplicate entry is harmless.

Test. A stale ~/.local/bin/node must not win in bash -lc. Without the fix, ubuntu fails this test (77/78). With it, ubuntu and arch both pass 78/78. Arch hit one unrelated flake (install output contains module 'ssh') that passed on rerun.

🤖 Generated with Claude Code

https://claude.ai/code/session_01S29GMkRB43pGsAUBUXwLdT

The stock Ubuntu ~/.profile sources ~/.bashrc (whose mise block adds the
shims) and then prepends ~/.local/bin; the ~/.profile block only added the
shims when absent, so stale ~/.local/bin copies (the tarball node, an old
starship) won in every login shell. Found by the nodejs provider=mise canary
on hal: nodejs verify failed with login node = ~/.local/bin/node.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S29GMkRB43pGsAUBUXwLdT
@garygentry
garygentry merged commit 1c7cbc9 into main Sep 27, 2026
4 checks 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.

1 participant