diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-03-10 00:04:35 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-03-10 00:04:35 +1300 |
commit | ea8277d61c7c02c434e4f481e2c9ff81b9e4e5b2 (patch) | |
tree | eda006e551e3d4f0e5454189600e1e9a05731d76 /sh | |
parent | Add go.sh for GOCODE and Go path (diff) | |
download | dotfiles-ea8277d61c7c02c434e4f481e2c9ff81b9e4e5b2.tar.gz dotfiles-ea8277d61c7c02c434e4f481e2c9ff81b9e4e5b2.zip |
Check existence before PATH prepend
Diffstat (limited to 'sh')
-rw-r--r-- | sh/profile.d/go.sh | 6 |
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 |