Use empty home variable for homebrew installation

Homebrew install script does not respect HOMEBREW_CACHE variable. Using an empty home variable ensures we get the result we want, but it is hacky.
This commit is contained in:
2025-10-18 18:03:49 +02:00
parent 87df4b6d7d
commit 854c19f35f

View File

@@ -207,9 +207,8 @@ function createBrewPeriodicScript() {
}
function installHomebrewCore() {
export NONINTERACTIVE=1
[ ! -d $(getHomebrewRepositoryPath) ] || return
sudo --preserve-env=NONINTERACTIVE -u "${homebrew_username}" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
NONINTERACTIVE=1 HOME= sudo --preserve-env=NONINTERACTIVE,HOME -u "${homebrew_username}" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
[ -d $(getHomebrewRepositoryPath) ]
}