Merge "Improve bazel() warning in envsetup.sh." am: c137b8520b
am: e0b4775fed
am: c9e50e33b1
Original change: https://android-review.googlesource.com/c/platform/build/+/1732933 Change-Id: I5a21a4deeca1604e6381673b35ee0ab1ef043b4e
This commit is contained in:
14
envsetup.sh
14
envsetup.sh
@@ -331,15 +331,15 @@ function setpaths()
|
|||||||
|
|
||||||
function bazel()
|
function bazel()
|
||||||
{
|
{
|
||||||
local T="$(gettop)"
|
if which bazel &>/dev/null; then
|
||||||
if [ ! "$T" ]; then
|
>&2 echo "NOTE: bazel() function sourced from Android's envsetup.sh is being used instead of $(which bazel)"
|
||||||
echo "Couldn't locate the top of the tree. Try setting TOP."
|
>&2 echo
|
||||||
return
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if which bazel &>/dev/null; then
|
local T="$(gettop)"
|
||||||
>&2 echo "NOTE: bazel() function sourced from envsetup.sh is being used instead of $(which bazel)"
|
if [ ! "$T" ]; then
|
||||||
>&2 echo
|
>&2 echo "Couldn't locate the top of the Android tree. Try setting TOP. This bazel() function cannot be used outside of the AOSP directory."
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$T/tools/bazel" "$@"
|
"$T/tools/bazel" "$@"
|
||||||
|
Reference in New Issue
Block a user