Fix default agent setup edge cases

This commit is contained in:
David Heinemeier Hansson
2026-08-01 19:52:04 -07:00
parent 6009e8a73b
commit 7b4fb0ad6b
6 changed files with 69 additions and 9 deletions
+6 -2
View File
@@ -17,7 +17,7 @@ fi
case "$1" in
pi) agent="pi"; name="Pi" ;;
omp | oh-my-pi) agent="omp"; name="Oh My Pi"; agent_package="oh-my-pi" ;;
omp | oh-my-pi) agent="omp"; name="Oh My Pi"; agent_package="github:can1357/oh-my-pi" ;;
opencode | open-code) agent="opencode"; name="OpenCode" ;;
claude | claude-code) agent="claude"; name="Claude Code" ;;
codex) agent="codex"; name="Codex" ;;
@@ -40,7 +40,11 @@ if ! mise where "$agent_package" &>/dev/null; then
fi
if ! mise use -g "$agent_package"; then
[[ $installing == "true" ]] && omarchy-notification-send -g 󰚩 "Could not install $name with mise"
if [[ $installing == "true" ]]; then
omarchy-notification-send -g 󰚩 "Could not install $name with mise"
else
omarchy-notification-send -g 󰚩 "Could not set $name as the default coding agent"
fi
exit 1
fi