mirror of
git://code.qt.io/qt/qt5.git
synced 2025-12-21 07:28:21 +08:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user