aboutsummaryrefslogtreecommitdiff
path: root/kokoro
diff options
context:
space:
mode:
authorTed Xie <tedx@google.com>2023-09-18 09:16:57 -0700
committerCopybara-Service <copybara-worker@google.com>2023-09-18 09:17:36 -0700
commit0a59e5dbc361e32a7933010c7c4871ac2581ac34 (patch)
treec821886d8f01714b7e9781004900495d44f1e7a5 /kokoro
parentf3f9137d9c58f08eae5e9c240e2c94abbdd6b642 (diff)
downloadbazelbuild-rules_android-0a59e5dbc361e32a7933010c7c4871ac2581ac34.tar.gz
internal change
PiperOrigin-RevId: 566322487 Change-Id: I087a36de2fc0b0bb41e850a6c60354e6659eaac7
Diffstat (limited to 'kokoro')
-rw-r--r--kokoro/presubmit/presubmit_main.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/kokoro/presubmit/presubmit_main.sh b/kokoro/presubmit/presubmit_main.sh
index 89854bf..be3faec 100644
--- a/kokoro/presubmit/presubmit_main.sh
+++ b/kokoro/presubmit/presubmit_main.sh
@@ -60,6 +60,14 @@ function main() {
}
trap Cleanup EXIT
+ function cd () {
+ # This is necessary due to a weird docker image issue where non-root
+ # accounts have `cd` overriden by a function that has an unbound variable.
+ # The unbound variable caues presubmit failure to due `set -u` above.
+ # The `cd` override only happens for non-root users.
+ builtin cd "$@"
+ }
+
# ANDROID_HOME is already in the environment.
export ANDROID_NDK_HOME="/opt/android-ndk-r16b"