diff options
author | Elliott Hughes <enh@google.com> | 2024-03-20 17:23:40 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2024-03-20 17:23:40 -0700 |
commit | 7e7ff750420d283e40d29983f4418ad7fca78838 (patch) | |
tree | c8033db0f9373d23ac93e8ce5cc912ce3460c4da | |
parent | 6d5a509efa35199f1903caebe560fe3ca9f63f6f (diff) | |
download | build-7e7ff750420d283e40d29983f4418ad7fca78838.tar.gz |
Fix adb function.
It was broken by the last change (because unlike `which adb`, `command
adb` does not search $PATH if there's already an entry in the hash).
No-one's noticed in almost a year, but this has caused (rare) confusion
in the past.
Bug: http://b/24473359
Change-Id: I6bbb207992449132ba8563a8bcf298256c599c0d
-rw-r--r-- | envsetup.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/envsetup.sh b/envsetup.sh index db21188967..1907e4c53a 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -1085,7 +1085,12 @@ function cproj() } function adb() { - command adb "${@}" + local ADB=$(which adb) + if [ -z "$ADB" ]; then + echo "Command adb not found; try lunch (and building) first?" + return 1 + fi + $ADB "${@}" } # simplified version of ps; output in the form |