summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Saagar Jha <saagarjha@google.com> 2023-07-13 23:31:59 +0000
committer Saagar Jha <saagarjha@google.com> 2023-07-13 23:36:29 +0000
commit11f188c09ae2cd0446296f8bcf996f2e63f3a0e0 (patch)
treed7ecb60ddf529bed28080b06701a4be3db78a790
parente75c063d1f3ff46468c88ca9788f8bbbfbff46cc (diff)
Use command instead of which to locate/run adb
If adb is not found on PATH, which will silently fail and evaluate to the empty string. This will cause the remaining arguments to be interpreted as a command to run in the shell, which is generally undesirable. (Consider, for example, "adb reboot" -> "reboot".) Bug: 24473359 Test: Just run adb before lunch so it's not on PATH Change-Id: I6b20722add6c67d1d2627f963dc66095502ab816 Signed-off-by: Saagar Jha <saagarjha@google.com>
-rw-r--r--envsetup.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/envsetup.sh b/envsetup.sh
index 9a0cd9705e..0a90460120 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -1076,7 +1076,7 @@ function cproj()
}
function adb() {
- `which adb` "${@}"
+ command adb "${@}"
}
# simplified version of ps; output in the form