Commit c590db2b authored by Rob Pike's avatar Rob Pike

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
parent 27087022
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment