diff --git a/.github/workflows/terraform-compatibility-matrix.yml b/.github/workflows/terraform-compatibility-matrix.yml index cda58aeb42..6cde909d40 100644 --- a/.github/workflows/terraform-compatibility-matrix.yml +++ b/.github/workflows/terraform-compatibility-matrix.yml @@ -48,8 +48,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | output=$(./scripts/get-terraform-supported-versions.sh) - quoted_output=$(echo "$output" | jq -c .) - echo "supported_versions=$quoted_output" >> "$GITHUB_OUTPUT" + echo "supported_versions=$output" >> "$GITHUB_OUTPUT" - name: Print HashiCorp Terraform supported versions shell: bash run: | diff --git a/scripts/get-terraform-supported-versions.sh b/scripts/get-terraform-supported-versions.sh index 45e10eed91..7f5d09de9e 100755 --- a/scripts/get-terraform-supported-versions.sh +++ b/scripts/get-terraform-supported-versions.sh @@ -88,4 +88,4 @@ versions_array=$(printf '%s\n' "${json_array}" | jq -r '.[] | .version') formatted_output=$(echo "$versions_array" | awk 'BEGIN { ORS = "" } {gsub(/^v/,"",$1); gsub(/\.0$/,".x",$1); printf("%s\"%s\"", (NR==1?"":", "), $1)}' | sed 's/,"/," /g') -echo "[$formatted_output]" | jq -R . +echo "[$formatted_output]" | jq -c .