From f4ec5285ead2b4182a7e96ca90d9d4b5ddb9c65c Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Mon, 13 Dec 2021 11:00:02 +0100 Subject: [PATCH] homebrew: Make sure brew(1) command actually works There are wrapper scripts out there -- at least my own ;-) -- which are available even on systems where no "real" brew is available, and therefore this wrapper errors our when called. So not only check for brew's existence, but if it is working when checking for plugins. --- plugins/homebrew/homebrew.zprofile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/homebrew/homebrew.zprofile b/plugins/homebrew/homebrew.zprofile index 84cb740..f59d43e 100644 --- a/plugins/homebrew/homebrew.zprofile +++ b/plugins/homebrew/homebrew.zprofile @@ -4,6 +4,11 @@ # Make sure that "brew(1)" is installed (( $+commands[brew] )) || return 1 +if [[ -n "$AXZSH_PLUGIN_CHECK" ]]; then + # Make sure brew command is working + brew --version >/dev/null 2>&1 || return 1 +fi + eval "$(brew shellenv)" for dir ( -- 2.39.2