cryptojuice / gobrew

Shell script to download and set GO environmental paths to allow multiple versions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot change version if user group contains two words

dskarataev opened this issue · comments

When I run gobrew use 1.8 it shows that the version is not installed.

I investigated why and I see this line in libexec/gobrew-use file:

VERSIONS=ls -l $GOBREW_ROOT/versions | egrep '^d' | awk '{print $9}'

and the problem is in awk command because if my user group contains two words and space in between (my user in an Active Directory user) then the version name is on 10th position.

I just fixed it to awk '{print $10}' and it works perfect for me, but maybe you could find some general solution for that case.

Thanks :)