Use correct PATH for homebrew based on architecture

Task-number: QTQAINFRA-6903
Change-Id: I1b5f529e8e94a7e609b5be1704ed83f6380f4cc5
Reviewed-by: Ville-Pekka Karhu <ville-pekka.karhu@qt.io>
This commit is contained in:
Aku Pietikäinen
2025-08-15 15:47:16 +03:00
parent 77eb380ac0
commit f73de1b6a8

View File

@@ -32,8 +32,6 @@ installPkg() {
"/tmp/Homebrew-$VERSION.pkg"
sudo installer -pkg "/tmp/Homebrew-$VERSION.pkg" -target /
# Add homebrew to PATH
SetEnvVar "PATH" "/opt/homebrew/bin:\$PATH"
echo "Homebrew = $VERSION" >> ~/versions.txt
}
@@ -65,6 +63,14 @@ else
installPkg
fi
ARCH_TYPE=$(arch)
# Add homebrew to PATH
if [ "$ARCH_TYPE" == "arm64" ]; then
SetEnvVar "PATH" "/opt/homebrew/bin:\$PATH"
else
SetEnvVar "PATH" "/usr/local/bin:\$PATH"
fi
# Disable non-ascii output for homebrew to make logs more readable
SetEnvVar "HOMEBREW_NO_COLOR" "1"
SetEnvVar "HOMEBREW_NO_EMOJI" "1"