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' --- mkshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mkshrc') diff --git a/mkshrc b/mkshrc index cc97e80..f5927fc 100644 --- a/mkshrc +++ b/mkshrc @@ -96,7 +96,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