constabulary / gb

gb, the project based build tool for Go
https://getgb.io/
MIT License
2.15k stars 150 forks source link

gb vendor doesn't work with fish shell #739

Closed coolaj86 closed 5 years ago

coolaj86 commented 5 years ago

Problem

echo $PATH
/Users/aj/go/bin /usr/local/opt/gettext/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/X11/bin /usr/local/go/bin
echo $GOPATH
/Users/aj/go
gb vendor list
FATAL: unknown command "vendor"

If I go back and run it with bash (same environment variables) it works, however.

coolaj86 commented 5 years ago

nevermind, I think...

Solution

For some reason I had to manually export PATH... which seems very strange since child processes normally have access to it by default. Maybe fish is weird that way...

set -g PATH $PATH "$HOME/go/bin"
set -x PATH $PATH
set -g GOPATH "$HOME/go"
set -x GOPATH $GOPATH