aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sh/profile.d/go.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/sh/profile.d/go.sh b/sh/profile.d/go.sh
index 51439221..592b651e 100644
--- a/sh/profile.d/go.sh
+++ b/sh/profile.d/go.sh
@@ -2,6 +2,8 @@
GOPATH=$HOME/.local/gocode
export GOPATH
-# Prepend GOPATH to PATH for the executables
-PATH=$GOPATH/bin:$PATH
+# Prepend GOPATH to PATH for the executables if it exists
+if [ -d "$GOPATH"/bin ] ; then
+ PATH=$GOPATH/bin:$PATH
+fi