Jrohy 3 éve
szülő
commit
7ea632a481
1 módosított fájl, 1 hozzáadás és 0 törlés
  1. 1 0
      install.sh

+ 1 - 0
install.sh

@@ -121,6 +121,7 @@ installGo(){
         else
             INSTALL_VERSION=`curl -s https://github.com/golang/go/releases|grep releases/tag|sed '/beta/d'|sed '/rc/d'|grep -o "[0-9].*[0-9]"|head -n 1`
         fi
+        [[ ${INSTALL_VERSION: -1} == '.' ]] && INSTALL_VERSION=${INSTALL_VERSION%?}
         echo "最新版golang: `colorEcho $BLUE $INSTALL_VERSION`"
         if [[ $FORCE_MODE == 0 && `command -v go` ]];then
             if [[ `go version|awk '{print $3}'|grep -Eo "[0-9.]+"` == $INSTALL_VERSION ]];then