When I set my GOPATH
use:
set -gx GOPATH /usr/local/Cellar/go/1.8.1
I get this issue:
-bash: set: -g: invalid option
set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
When I set my GOPATH
use:
set -gx GOPATH /usr/local/Cellar/go/1.8.1
I get this issue:
-bash: set: -g: invalid option
set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
The bash command set
doesn't support the g
option. Also this command is not used for setting environment variables all together - your snippet is probably intended for a different shell (fishshell?).
In bash
, use export
as suggested:
export GOPATH /usr/local/Cellar/go/1.8.1
However, you should understand what you are doing and how to configure your environment on MacOS (guessing from 'Cellar' in your path).
This might be a good starting point.