mirror of https://github.com/hashicorp/consul
Browse Source
We serially attempt to decode resources in the consul resource apply command using HCL and then falling back on JSON. This causes the HCL errors to be dropped completely in the case where the HCL decode failed due to a typo instead of it actually being JSON instead. This PR proposes sniffing to see if the first non-whitespace character in the input is { and if so treat it as JSON, otherwise as HCL and not double-decode on error.pull/19140/head
R.B. Boyer
1 year ago
committed by
GitHub
1 changed files with 36 additions and 7 deletions
Loading…
Reference in new issue