aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-03-10 00:04:35 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-03-10 00:04:35 +1300
commitea8277d61c7c02c434e4f481e2c9ff81b9e4e5b2 (patch)
treeeda006e551e3d4f0e5454189600e1e9a05731d76 /sh
parentAdd go.sh for GOCODE and Go path (diff)
downloaddotfiles-ea8277d61c7c02c434e4f481e2c9ff81b9e4e5b2.tar.gz
dotfiles-ea8277d61c7c02c434e4f481e2c9ff81b9e4e5b2.zip
Check existence before PATH prepend
Diffstat (limited to 'sh')
-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