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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
b5bb8dac05
commit
1c3da94906
@@ -105,7 +105,7 @@ assert_lazy_stub() {
|
||||
"$test_home/.local/bin/$command" --version
|
||||
mapfile -t mise_calls <"$mise_history"
|
||||
|
||||
[[ ${mise_calls[0]} == "use -g $package" && ${mise_calls[1]} == "x $package -- $command --version" ]] ||
|
||||
[[ ${mise_calls[0]} == "use -g --quiet $package" && ${mise_calls[1]} == "x $package -- $command --version" ]] ||
|
||||
fail "$command lazy stub preserves its mise package"
|
||||
}
|
||||
|
||||
@@ -138,6 +138,24 @@ source "$ROOT/migrations/1785617047.sh" >/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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user