浏览代码

fix: remove double square brackets

Ludovic Ortega 1 年之前
父节点
当前提交
1bfd4672e1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      deploy/truenas.sh

+ 1 - 1
deploy/truenas.sh

@@ -67,7 +67,7 @@ truenas_deploy() {
   _info "Getting TrueNAS version"
   _response=$(_get "$_api_url/system/version")
 
-  if [[ "$_response" = *"SCALE"* ]]; then
+  if echo "$_response" | grep -q "SCALE"; then
     _truenas_os=$(echo "$_response" | cut -d '-' -f 2)
     _truenas_version=$(echo "$_response" | cut -d '-' -f 3 | tr -d '"' | cut -d '.' -f 1,2)
   else