aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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