File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424
2525version_exists () {
2626 local input_version=" $1 "
27- local use_go_mod=" $2 "
2827
29- if [[ -n $use_go_mod ]] && [[ - d ${GOENV_ROOT} /versions ]] && grep -q -E " ^[0-9]+\.[0-9]+\.?[0-9]*(\s*)$" <<< ${input_version} ; then
28+ if [[ -d ${GOENV_ROOT} /versions ]] && grep -q -E " ^[0-9]+\.[0-9]+\.?[0-9]*(\s*)$" <<< ${input_version} ; then
3029 OLDIFS=" $IFS "
3130 IFS=$' \n '
3231 local version_regex=$( echo ${input_version} | sed s/\\ ./\\\\ ./)
@@ -58,7 +57,7 @@ OLDIFS="$IFS"
5857 elif version_exists " ${version# go-} " ; then
5958 versions=(" ${versions[@]} " " ${version# go-} " )
6059 else
61- if [[ -z $GOENV_GOMOD_VERSION_ENABLE ]] || ! version_exists " $version " " $GOENV_GOMOD_VERSION_ENABLE " ; then
60+ if [[ -z $GOENV_GOMOD_VERSION_ENABLE ]] || ! version_exists " $version " ; then
6261 echo " goenv: version '$version ' is not installed (set by $( goenv-version-origin) )" >&2
6362 any_not_installed=1
6463 fi
Original file line number Diff line number Diff line change 6161
6262version_exists () {
6363 local input_version=" $1 "
64- local use_go_mod=" $2 "
6564
66- if [[ -n $use_go_mod ]] && [[ - d ${GOENV_ROOT} /versions ]] && grep -q -E " ^[0-9]+\.[0-9]+(\s*)$" <<< ${input_version} ; then
65+ if [[ -d ${GOENV_ROOT} /versions ]] && grep -q -E " ^[0-9]+\.[0-9]+(\s*)$" <<< ${input_version} ; then
6766 OLDIFS=" $IFS "
6867 IFS=$' \n '
6968 local version_regex=$( echo ${input_version} | sed s/\\ ./\\\\ ./)
@@ -91,12 +90,15 @@ if [ -x "$GOENV_COMMAND_PATH" ]; then
9190 exit 0
9291fi
9392
93+ echo " goenv: You asshole"
94+
9495any_not_installed=0
9596for version in " ${versions[@]} " ; do
9697 if [ " $version " = " system" ]; then
9798 continue
9899 fi
99- if ! version_exists " $version " " $GOENV_GO_MOD_ENABLE " ; then
100+
101+ if ! version_exists " $version " ; then
100102 echo " goenv: version '$version ' is not installed (set by $( goenv-version-origin) )" >&2
101103 any_not_installed=1
102104 fi
You can’t perform that action at this time.
0 commit comments