Skip to content

fix(mise): refuse to clobber a user's own ~/.local/bin wrapper - #72

Open
kvnloo wants to merge 1 commit into
stagingfrom
factory/tip-13243-mise-install-no-clobber
Open

kvnloo wants to merge 1 commit into
stagingfrom
factory/tip-13243-mise-install-no-clobber

Conversation

@kvnloo

@kvnloo kvnloo commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • bash test/shell.d/mise-install-test.sh (7 ok) — includes user-wrapper refuse, current-shim refresh, symlink drop-without-write-through

Upstream tip (read-only): omacom#13243
github_writes_origin=0 — no posts to omacom/omarchy.

omarchy-mise-install used to rm -f the target unconditionally before
writing its shim, which silently destroyed user wrappers (version pins,
custom API bases) and could write through a symlink into the real binary.

Only drop symlinks or files that match known mise shim templates; anything
else exits nonzero and leaves the file alone.

Upstream tip: omacom#13243 (c5114d9)
@kvnloo

kvnloo commented Sep 27, 2026

Copy link
Copy Markdown
Owner Author

Repair shipped on fork branch muse/mise-install-no-clobber @ 90c705e8c74d8820b41dea6ee9ee63035f84621f (parent fork quattro 28ceaae70eba).

  • bin/omarchy-mise-install no longer unconditionally rm -fs ~/.local/bin/<command> before writing its shim. It now only replaces a symlink or a regular file matching the mise shim template it writes itself; anything else fails loudly with the user's file left intact.
  • Evidence: test/shell.d/mise-install-test.sh green (new cases: user's own wrapper refused with message and left intact; existing shim refreshes; symlink replaced without touching its target). Red-on-base: base rm -fs the user's wrapper and the install succeeds.
  • API-verified: ref, parent, both blobs byte-identical, author Kevin Rajan, [muse] subject, AI disclosure footer, 2 files.

Fork-only; nothing touched upstream.

@kvnloo kvnloo added the keep pr-janitor: never auto-close label Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

keep pr-janitor: never auto-close

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant