gvm
gvm copied to clipboard
install gvm using zsh still update bashrc
Here my zsh version is zsh 5.9 (x86_64-pc-linux-gnu), gvm version is v1.0.22.
And I'm using oh-my-zsh.
After install gvm, gvm updates my profile .bashrc, not .zshrc
I use env | grep -i zsh, it prints
SHELL=/usr/bin/zsh
ZSH=/home/crimson/.oh-my-zsh
It seems there is no ZSH_NAME environment variable, but ZSH Instead.
It's ok for me to copy the code from bashrc to zshrc, but it would be better if got fixed.
Here is a piece of code from gvm:
if [ -z "$GVM_NO_UPDATE_PROFILE" ] ; then
if [ -n "$ZSH_NAME" ]; then
update_profile "$HOME/.zshrc"
elif [ "$(uname)" == "Linux" ]; then
update_profile "$HOME/.bashrc" || update_profile "$HOME/.bash_profile"
elif [ "$(uname)" == "Darwin" ]; then
update_profile "$HOME/.profile" || update_profile "$HOME/.bash_profile"
fi
fi
Did you install using zsh or bash?
See https://github.com/moovweb/gvm#installing
Or if you are using zsh just change
bashwithzsh
@crimson-gao kindly try this GO Version Manager: https://github.com/ankitcharolia/goenv