aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2024-03-21 15:42:02 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-03-21 15:42:02 +0000
commit31a9fee831315547b4807763e6f1627fdee69bd7 (patch)
tree8e58c181c243e6db125463ef8194f701b90d8387
parenta0f30662d015f0ed43f8a26ff48b23c56492452f (diff)
parent7e7ff750420d283e40d29983f4418ad7fca78838 (diff)
downloadbuild-31a9fee831315547b4807763e6f1627fdee69bd7.tar.gz
Merge "Fix adb function." into main
-rw-r--r--envsetup.sh7
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