Commit 146c556b authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

fix: fix failed query/replace

parent 29631591
Loading
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ function unscope_variables() {
    _test_op=$(echo "$_fields" | cut -d: -f5)
    case "$_test_op" in
    defined)
      if [[ -z "$_not" ]] && [[ -z "$_cond_val" ]]; then continue;managerFilePatterns
      elif [[ "$_not" ]] && [[ "$_cond_val" ]]; then continue;managerFilePatterns
      if [[ -z "$_not" ]] && [[ -z "$_cond_val" ]]; then continue;
      elif [[ "$_not" ]] && [[ "$_cond_val" ]]; then continue;
      fi
      ;;
    equals|startswith|endswith|contains|in|equals_ic|startswith_ic|endswith_ic|contains_ic|in_ic)
@@ -44,28 +44,28 @@ function unscope_variables() {
      fi
      case "$_test_op" in
      equals*)
        if [[ -z "$_not" ]] && [[ "$_cond_val" != "$_cmp_val" ]]; then continue;managerFilePatterns
        elif [[ "$_not" ]] && [[ "$_cond_val" == "$_cmp_val" ]]; then continue;managerFilePatterns
        if [[ -z "$_not" ]] && [[ "$_cond_val" != "$_cmp_val" ]]; then continue;
        elif [[ "$_not" ]] && [[ "$_cond_val" == "$_cmp_val" ]]; then continue;
        fi
        ;;
      startswith*)
        if [[ -z "$_not" ]] && [[ "$_cond_val" != "$_cmp_val"* ]]; then continue;managerFilePatterns
        elif [[ "$_not" ]] && [[ "$_cond_val" == "$_cmp_val"* ]]; then continue;managerFilePatterns
        if [[ -z "$_not" ]] && [[ "$_cond_val" != "$_cmp_val"* ]]; then continue;
        elif [[ "$_not" ]] && [[ "$_cond_val" == "$_cmp_val"* ]]; then continue;
        fi
        ;;
      endswith*)
        if [[ -z "$_not" ]] && [[ "$_cond_val" != *"$_cmp_val" ]]; then continue;managerFilePatterns
        elif [[ "$_not" ]] && [[ "$_cond_val" == *"$_cmp_val" ]]; then continue;managerFilePatterns
        if [[ -z "$_not" ]] && [[ "$_cond_val" != *"$_cmp_val" ]]; then continue;
        elif [[ "$_not" ]] && [[ "$_cond_val" == *"$_cmp_val" ]]; then continue;
        fi
        ;;
      contains*)
        if [[ -z "$_not" ]] && [[ "$_cond_val" != *"$_cmp_val"* ]]; then continue;managerFilePatterns
        elif [[ "$_not" ]] && [[ "$_cond_val" == *"$_cmp_val"* ]]; then continue;managerFilePatterns
        if [[ -z "$_not" ]] && [[ "$_cond_val" != *"$_cmp_val"* ]]; then continue;
        elif [[ "$_not" ]] && [[ "$_cond_val" == *"$_cmp_val"* ]]; then continue;
        fi
        ;;
      in*)
        if [[ -z "$_not" ]] && [[ "__${_cmp_val}__" != *"__${_cond_val}__"* ]]; then continue;managerFilePatterns
        elif [[ "$_not" ]] && [[ "__${_cmp_val}__" == *"__${_cond_val}__"* ]]; then continue;managerFilePatterns
        if [[ -z "$_not" ]] && [[ "__${_cmp_val}__" != *"__${_cond_val}__"* ]]; then continue;
        elif [[ "$_not" ]] && [[ "__${_cmp_val}__" == *"__${_cond_val}__"* ]]; then continue;
        fi
        ;;
      esac