Browse Source

feat: Remove leading and trailing spaces from VERSION (#1392)

Kroese 4 months ago
parent
commit
1c15df95ac
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/define.sh

+ 2 - 1
src/define.sh

@@ -23,7 +23,8 @@ parseVersion() {
   if [[ "${VERSION}" == \"*\" || "${VERSION}" == \'*\' ]]; then
     VERSION="${VERSION:1:-1}"
   fi
-
+  
+  VERSION=`expr "$VERSION" : "^\ *\(.*[^ ]\)\ *$"`
   [ -z "$VERSION" ] && VERSION="win11"
 
   case "${VERSION,,}" in