From db09e7e10edee02a01a7dc287b35e46cd75bf6d8 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Thu, 17 Oct 2019 22:03:05 -0400 Subject: Fix the goroot handling in 'set_go' --- shell/utils | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shell/utils') diff --git a/shell/utils b/shell/utils index 3fceec8..3822ca2 100644 --- a/shell/utils +++ b/shell/utils @@ -3,7 +3,8 @@ set_go() { export GOPATH="${GOPATH:-$HOME/go}" export PATH="$GOPATH/bin:$PATH" - _gobin="/usr/local/go/bin" + GOROOT="${GOROOT:-/usr/local/go}" + _gobin="${GOROOT}/bin" if [ -e "$_gobin" ] ; then export PATH="$_gobin:$PATH" fi -- cgit v1.2.3