From 4d63819538a9f1947068ef379ccd8bc4c4af6c92 Mon Sep 17 00:00:00 2001 From: fauzan171 Date: Sat, 6 Jun 2026 23:47:22 +0700 Subject: [PATCH] fix(heroku-alias): add command guard check for heroku - Add command existence check at the top of the plugin to prevent aliases and functions from being created when heroku is not installed. This is consistent with other plugins (e.g. bun, volta, gh, helm) that guard against missing commands. --- plugins/heroku-alias/heroku-alias.plugin.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/heroku-alias/heroku-alias.plugin.zsh b/plugins/heroku-alias/heroku-alias.plugin.zsh index 7daf715b5..f2dc10c7d 100644 --- a/plugins/heroku-alias/heroku-alias.plugin.zsh +++ b/plugins/heroku-alias/heroku-alias.plugin.zsh @@ -1,3 +1,8 @@ +# Return immediately if heroku is not found +if (( ! ${+commands[heroku]} )); then + return +fi + # general alias h='heroku' alias hauto='heroku autocomplete $(echo $SHELL)'