mirror of https://github.com/golang/go.git
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:
parent
27087022ce
commit
c590db2b8b
|
|
@ -12,6 +12,12 @@ Darwin)
|
||||||
exit 0
|
exit 0
|
||||||
esac
|
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)
|
eval $(go env)
|
||||||
if ! [ -x $GOTOOLDIR/cov -a -x $GOTOOLDIR/prof ]; then
|
if ! [ -x $GOTOOLDIR/cov -a -x $GOTOOLDIR/prof ]; then
|
||||||
echo "You don't need to run sudo.bash." >&2
|
echo "You don't need to run sudo.bash." >&2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue