chore: add HOMEBREW_PREFIX fallback

This commit is contained in:
Alberto García 2025-12-18 16:09:37 +01:00 committed by GitHub
parent 72f27fa0dc
commit 2b8dd0f3d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,5 +4,6 @@
# See: https://github.com/ublue-os/brew/blob/54b30cc07d3211fca65ca5cc724e9812c8c79b77/system_files/usr/lib/systemd/system/brew-upgrade.service#L17-L22
if [[ -d /home/linuxbrew/.linuxbrew && $- == *i* ]] ; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv | grep -Ev '\bPATH=')"
HOMEBREW_PREFIX="${HOMEBREW_PREFIX:-/home/linuxbrew/.linuxbrew}"
export PATH="${PATH}:${HOMEBREW_PREFIX}/bin:${HOMEBREW_PREFIX}/sbin"
fi