- elif [ "$cur_go" != "$new_go" ]; then
- echo "WARN: possible conflict between go${WEBI_VERSION} and go${cur_go_version} at ${cur_go}"
+ else
+ if [ "$cur_go" != "$common_go_home/bin/go" ] && [ "$cur_go" != "$new_go" ]; then
+ echo "WARN: possible conflict between go${WEBI_VERSION} and go${cur_go_version} at ${cur_go}"
+ fi
+ if [ -x "$new_go_home/bin/go" ]; then
+ update_go_home
+ echo "switched to go${WEBI_VERSION} at $new_go_home"
+ exit 0
+ fi