moovweb / gvm

Go Version Manager
http://github.com/moovweb/gvm
MIT License
9.87k stars 520 forks source link

zsh: = not found #440

Closed jacobintern closed 9 months ago

jacobintern commented 10 months ago

When I clone gvm into my mac, it always say "zsh: = not found", and i found my .gvm/scripts/ folder dosen't have any gvm file in there.

image

this is my .zshrc setting

image

and I can't find any gvm in scripts folder

image
goFrendiAsgard commented 10 months ago

Can you make sure that you use zsh?

Try to invoke echo $SHELL and which zsh.

image

If which zsh yield error, make sure you have $PATH set correctly.

echo $PATH

You should have /usr/bin in your PATH.

If $PATH yield incorrect result, try to comment [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh in your ~/.zshrc

RangerCD commented 10 months ago

Same issue here, either my workstation with Manjaro, or my steamdeck. which zsh and echo $SHELL point to the same path /usr/bin/zsh

jacobintern commented 10 months ago

@goFrendiAsgard I am sure that I use zsh. but I can use bash version command install gvm in my zsh shell ...

RangerCD commented 10 months ago

This issue is related to line 115 here:

https://github.com/moovweb/gvm/blob/dd652539fa4b771840846f8319fad303c7d0a8d2/binscripts/gvm-installer#L115C22-L115C22

Since I don't care about .bashrc or .bash_profile, I just replace this line with dummy echo, then the installer works fine.

RangerCD commented 10 months ago

This issue is related to line 115 here:

https://github.com/moovweb/gvm/blob/dd652539fa4b771840846f8319fad303c7d0a8d2/binscripts/gvm-installer#L115C22-L115C22

Since I don't care about .bashrc or .bash_profile, I just replace this line with dummy echo, then the installer works fine.

Or maybe also append the newly added line in .zshrc to .bashrc would be better.

adonespitogo commented 10 months ago

I can confirm @RangerCD 's solution works.

samsamm777 commented 10 months ago

+1 I have this issue too...

➜ ~ echo $0 -zsh ➜ ~ zsh < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) Cloning from https://github.com/moovweb/gvm.git to /Users/XXXXX/.gvm zsh: = not found

ashaffah commented 10 months ago

I have the same problem here

RangerCD commented 10 months ago

442 should fix this issue

ankitcharolia commented 10 months ago

@RangerCD @Ashaffah @samsamm777 @adonespitogo @jacobintern @goFrendiAsgard: kindly try out this one. it supports bash and zsh : https://github.com/ankitcharolia/goenv