From 66a30a7e6d9658b073cf085bab9137aec1e20369 Mon Sep 17 00:00:00 2001 From: Milad Fa Date: Thu, 18 May 2023 18:26:40 +0000 Subject: [PATCH] Skip goma on unsupported platforms Goma is not available on ppc/s390x platforms and causes a crash when running gclient as it cannot find goma_ctl.py. Change-Id: Icf08c6782d66f99eaf8f3c6ba42a170521afeb86 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4545381 Reviewed-by: Gavin Mak Commit-Queue: Gavin Mak Reviewed-by: Bruce Dawson --- goma_ctl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/goma_ctl b/goma_ctl index b3c6547c7e..da7320eb35 100755 --- a/goma_ctl +++ b/goma_ctl @@ -17,4 +17,9 @@ MYPATH=$(dirname "${BASH_SOURCE[0]}") source "$MYPATH/cipd_bin_setup.sh" cipd_bin_setup &> /dev/null -PYTHONDONTWRITEBYTECODE=1 exec python3 "$MYPATH/.cipd_bin/goma_ctl.py" "$@" +GOMA="$MYPATH/.cipd_bin/goma_ctl.py" +if [[ -f "$GOMA" ]]; then + PYTHONDONTWRITEBYTECODE=1 exec python3 "$GOMA" "$@" +else + echo "'$GOMA' was not found and may not be supported on this platform!" +fi