diff options
author | Elliott Hughes <enh@google.com> | 2024-03-21 20:40:33 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-03-21 20:40:33 +0000 |
commit | 4e1a3498c1c8e1d6531b0ea537c61b83833d48e3 (patch) | |
tree | 6901c58fce59539dc5c3829a5faa11d5bf901d4a | |
parent | 62ca754567b4e24cdcb4b744265b01a4b8147916 (diff) | |
parent | 86e991710c237871932a48f8a3eb41e1aafb7aed (diff) | |
download | build-4e1a3498c1c8e1d6531b0ea537c61b83833d48e3.tar.gz |
Merge "envsetup.sh: explain _why_ there's an adb function in here." into main
-rw-r--r-- | envsetup.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/envsetup.sh b/envsetup.sh index 1907e4c53a..74cfbbd7f3 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -1084,6 +1084,14 @@ function cproj() echo "can't find Android.mk" } +# Ensure that we're always using the adb in the tree. This works around the fact +# that bash caches $PATH lookups, so if you use adb before lunching/building the +# one in your tree, you'll continue to get /usr/bin/adb or whatever even after +# you have the one from your current tree on your path. Historically this would +# cause confusion because glinux had adb in /usr/bin/ by default, though that +# doesn't appear to be the case on my rodete hosts; it is however still the case +# that my Mac has /usr/local/bin/adb installed by default and on the default +# path. function adb() { local ADB=$(which adb) if [ -z "$ADB" ]; then |