Skip to content

Regenerate mise wrappers that still print mise's output to stdout - #8041

Merged
dhh merged 1 commit into
quattrofrom
regenerate-stale-mise-wrappers
Aug 24, 2026
Merged

dhh merged 1 commit into
quattrofrom
regenerate-stale-mise-wrappers

Conversation

@dhh

@dhh dhh commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

omarchy-mise-install gained --quiet on its mise use -g line in #6940 so a wrapper no longer prints mise's own tools: pkg@version line ahead of the tool's output. But the generator only writes wrappers as they are installed, and the migration that installed the current set (1785846769.sh) is already marked complete on every existing machine — so nothing rewrites what is already on disk.

The result on a 4.0.1rc1 box that was installed before the fix:

$ ~/.local/bin/claude --version
mise ~/.config/mise/config.toml tools: [email protected]
2.1.241 (Claude Code)

All 13 wrappers in ~/.local/bin are affected there (claude, codex, copilot, crush, gemini, gh, ghui, grok, hunk, omp, opencode, pi, playwright). Only a fresh install gets the fix today. It is more than cosmetic for a wrapper whose caller parses stdout.

#7929 anticipated the new wrapper text — it loosened 1785846769.sh's grep from 'mise use -g "oh-my-pi"' to 'mise use -g .*"oh-my-pi"' — but that edit landed on an already-applied migration, so it never re-runs.

What this does

Rewrites the wrappers through omarchy-mise-install, so the template stays in one place, following 1784909971.sh's precedent.

Wrappers were written by four different generated forms over time, and only the ones a later migration happened to regenerate moved forward, so a machine can still be carrying any of them:

form shipped as
mise use -g "$package" + exec "$bin" "$@" before the PATH-recursion fix
mise use -g "$package" + exec mise exec … when 1784909971.sh ran
+ || exit 1, mise x after the install-failure fix
+ export MISE_MINIMUM_RELEASE_AGE=0 current, pre---quiet

All four are recognized and brought up to the current template.

The whole file has to match one of those forms exactly, rebuilt from the package and bin the file itself names. That way a wrapper someone has added a line to is left alone rather than silently regenerated without it, and a wrapper already carrying --quiet matches nothing, which is what makes a second run a no-op.

~/.local/bin also holds real binaries — uv and uvx land there from the Python dev env — so the size is checked before reading, rather than pulling a 30MB executable into memory to discover it is not a wrapper.

Testing

test/shell.d/mise-wrapper-quiet-migration-test.sh runs the real omarchy-mise-install from the checkout against a fake $HOME, so it proves the template written today rather than a copy that could drift. It covers all four stale forms, package/bin preservation (including scoped npm and github:/aqua: packages), idempotence, a missing ~/.local/bin, and that hand-written scripts, mismatched files, symlinks, native binaries, and customized wrappers are left alone.

Verified against a real 4.0.1rc1 machine: all 13 stale wrappers repaired, nothing else in ~/.local/bin touched.

omarchy-mise-install gained --quiet on its `mise use -g` line so a wrapper
no longer prints mise's "tools: pkg@version" ahead of the tool's own
output. That only changes wrappers written from then on, and the migration
that installed the current ones is already marked complete, so every
wrapper already on disk keeps polluting stdout: `claude --version` still
answers with two lines, and a wrapper for a protocol-speaking command
answers with a line its caller cannot parse.

Rewrite them through omarchy-mise-install so the template stays in one
place. Wrappers were written by four different generated forms over time
and only the ones a later migration happened to regenerate moved forward,
so all four are recognized. The whole file has to match one of them
exactly, which leaves a wrapper someone has added a line to alone and
makes a second run a no-op.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mv1FyKG2VGZRdtknQ7YjU8
Copilot AI balanced review requested due to automatic review settings August 24, 2026 12:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an idempotent migration to regenerate stale mise wrappers using the current quiet template.

Changes:

  • Recognizes and regenerates four historical wrapper formats.
  • Preserves package and binary names while avoiding customized files, symlinks, and binaries.
  • Adds comprehensive migration tests.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
migrations/1787573629.sh Safely regenerates recognized stale mise wrappers.
test/shell.d/mise-wrapper-quiet-migration-test.sh Tests historical formats, preservation, safety, and idempotence.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dhh
dhh merged commit 535d8f3 into quattro Aug 24, 2026
4 checks passed
@dhh
dhh deleted the regenerate-stale-mise-wrappers branch August 24, 2026 12:36
@thecdrz thecdrz mentioned this pull request Aug 24, 2026
3 tasks done
nick1udwig pushed a commit to nick1udwig/omarchy that referenced this pull request Sep 9, 2026
…acom#8041)

omarchy-mise-install gained --quiet on its `mise use -g` line so a wrapper
no longer prints mise's "tools: pkg@version" ahead of the tool's own
output. That only changes wrappers written from then on, and the migration
that installed the current ones is already marked complete, so every
wrapper already on disk keeps polluting stdout: `claude --version` still
answers with two lines, and a wrapper for a protocol-speaking command
answers with a line its caller cannot parse.

Rewrite them through omarchy-mise-install so the template stays in one
place. Wrappers were written by four different generated forms over time
and only the ones a later migration happened to regenerate moved forward,
so all four are recognized. The whole file has to match one of them
exactly, which leaves a wrapper someone has added a line to alone and
makes a second run a no-op.


Claude-Session: https://claude.ai/code/session_01Mv1FyKG2VGZRdtknQ7YjU8

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
@emirb emirb added this to the 4.5 milestone Oct 17, 2026
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.

3 participants