Skip to content

Commit ea34575

Browse files
committed
fix(terraform): parse JSON response when fetching specific Terraform version
The specific-version branch of Get-TerraformTool assigned the raw JSON string to $release instead of parsing it, causing the builds lookup to return an empty download URL.
1 parent 7542374 commit ea34575

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ALZ/Private/Tools/Get-TerraformTool.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function Get-TerraformTool {
4747
Write-ToConsoleLog "Unable to query Terraform version '$version' from HashiCorp API. HTTP status code: $($versionResponse.StatusCode)" -IsError
4848
throw "Unable to query Terraform version, please check the supplied version and try again..."
4949
}
50-
$release = ($versionResponse).Content
50+
$release = ($versionResponse).Content | ConvertFrom-Json
5151
}
5252

5353
Write-Verbose "Required version of Terraform is $version"

0 commit comments

Comments
 (0)