63fa1ac418
This includes a small fix to ensure the parser doesn't produce an invalid body for block parsing syntax errors, and instead produces an incomplete result that calling applications like Terraform can still analyze. The problem here was affecting our version-constraint-sniffing code, which intentionally tried to find a core version constraint even if there's a syntax error so that it can report that a new version of Terraform is a likely cause of the syntax error. It was working in most cases, unless it was the "terraform" block itself that contained the error, because then we'd try to analyze a broken hcl.Block with a nil body. This includes a new test for "terraform init" that exercises this recovery codepath. |
||
---|---|---|
.. | ||
cloud.google.com/go | ||
github.com | ||
go.opencensus.io | ||
golang.org/x | ||
google.golang.org | ||
gopkg.in/yaml.v2 | ||
modules.txt |