From 57c47b70559e343102362caa6db496d59368469d Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 22 Mar 2024 15:46:59 +0000 Subject: [PATCH] envsetup.sh: work around zsh's built-in `which`. Change-Id: I2583e7c2d7f27aa0d1b0e81601dc3b10e2404c89 --- envsetup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/envsetup.sh b/envsetup.sh index 74cfbbd7f3..fbe522d866 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -1093,7 +1093,9 @@ function cproj() # that my Mac has /usr/local/bin/adb installed by default and on the default # path. function adb() { - local ADB=$(which adb) + # We need `command which` because zsh has a built-in `which` that's more + # like `type`. + local ADB=$(command which adb) if [ -z "$ADB" ]; then echo "Command adb not found; try lunch (and building) first?" return 1