From 1c3da949061a376440aa4c71cbf28f657df1a503 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 15 Aug 2026 17:00:19 +0200 Subject: [PATCH] Keep mise wrappers from writing to stdout (#6940) mise use -g announces the resolved tool on stdout, so every wrapped command prepended a "tools:" line to its own output. That corrupts anything speaking a protocol over stdout, such as codex app-server. Pass --quiet, which keeps errors on stderr and preserves the exit status. The obsolete-wrapper check in the agent migration matched the generated command verbatim, so loosen it to match the package instead of the flags. Closes #6908 Co-authored-by: Claude Opus 5 --- bin/omarchy-mise-install | 2 +- migrations/1785846769.sh | 2 +- test/shell.d/default-agent-test.sh | 20 +++++++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/bin/omarchy-mise-install b/bin/omarchy-mise-install index 87dc10fe..e6dfc96c 100755 --- a/bin/omarchy-mise-install +++ b/bin/omarchy-mise-install @@ -22,7 +22,7 @@ rm -f "$HOME/.local/bin/$command" cat >"$HOME/.local/bin/$command" </dev/null source "$ROOT/migrations/1785846769.sh" >/dev/null [[ ! -s $stub_log ]] || fail "agent migrations respect the preinstall opt-out" [[ ! -e $test_home/.local/bin/omp ]] || fail "agent migration removes the obsolete Oh My Pi wrapper after opt-out" + +# The matcher has to catch a bare oh-my-pi wrapper from either generation of the +# installer, and leave a wrapper built on the fully qualified package alone. +for obsolete_form in 'mise use -g "oh-my-pi"' 'mise use -g --quiet "oh-my-pi"'; do + printf '#!/bin/bash\n%s || exit 1\n' "$obsolete_form" >"$test_home/.local/bin/omp" + chmod +x "$test_home/.local/bin/omp" + source "$ROOT/migrations/1785846769.sh" >/dev/null + [[ ! -e $test_home/.local/bin/omp ]] || + fail "agent migration removes a wrapper built on [$obsolete_form]" +done + +printf '#!/bin/bash\nmise use -g --quiet "%s" || exit 1\n' "$omp_package" >"$test_home/.local/bin/omp" +chmod +x "$test_home/.local/bin/omp" +source "$ROOT/migrations/1785846769.sh" >/dev/null +[[ -e $test_home/.local/bin/omp ]] || + fail "agent migration keeps a wrapper built on $omp_package" +rm -f "$test_home/.local/bin/omp" + rm "$test_home/.local/state/omarchy/preinstalls-removed" pass "agent migrations install working wrappers without overriding the preinstall opt-out"