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"