1
0
mirror of https://github.com/golang/go synced 2024-11-24 22:57:57 -07:00

sudo.bash: diagnose when the go tool is not in $PATH

Fixes #4386.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/6854050
This commit is contained in:
Rob Pike 2012-11-15 10:42:39 -08:00
parent 27087022ce
commit c590db2b8b

View File

@ -12,6 +12,12 @@ Darwin)
exit 0
esac
# Check that the go command exists
if ! go help >/dev/null 2>&1; then
echo "The go command is not in your PATH." >&2
exit 2
fi
eval $(go env)
if ! [ -x $GOTOOLDIR/cov -a -x $GOTOOLDIR/prof ]; then
echo "You don't need to run sudo.bash." >&2