diff options
Diffstat (limited to 'src/sudo.bash')
-rwxr-xr-x | src/sudo.bash | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sudo.bash b/src/sudo.bash index 40f8d1aa1..7b7d4f1cd 100755 --- a/src/sudo.bash +++ b/src/sudo.bash @@ -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 |