Skip to content

Commit

Permalink
fix: Make this check if brew is installed before trying to run it. (#975
Browse files Browse the repository at this point in the history
)
  • Loading branch information
dylanmtaylor authored Feb 29, 2024
1 parent 6b669aa commit c0a2cfb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dx/usr/etc/zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#

if [[ -o interactive ]]; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
if command -v brew >/dev/null 2>&1; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi
fi

autoload -U compinit
Expand Down
2 changes: 1 addition & 1 deletion dx/usr/share/fish/vendor_conf.d/brew.fish
Original file line number Diff line number Diff line change
@@ -1 +1 @@
status --is-interactive && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
command -v brew >/dev/null 2>&1 && status --is-interactive && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
2 changes: 1 addition & 1 deletion usr/etc/profile.d/brew.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[[ $- == *i* ]] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
[[ $(command -v brew >/dev/null 2>&1) && $- == *i* ]] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

0 comments on commit c0a2cfb

Please sign in to comment.