Open caongocthai opened 4 years ago
Create simple hcl file example.tf:
example.tf
data "foo" { "bar" = " - \"one\"\n - \"-two\"\n - \"three\"" }
Run: cat example.tf | hclq get --raw 'data.foo.bar'
cat example.tf | hclq get --raw 'data.foo.bar'
Expect:
- "one" - "-two" - "three"
Get:
- "one" - "-two" - "three <- missing the last double quote here
This 2 scenarios would work fine without problem:
data "foo" { "bar" = " - \"one\"\n - \"-two\"\n - \"three\"\n" <- add a new line \n at the end here }
or
data "foo" { "bar" = " - 'one'\n - '-two'\n - 'three'" <- use single quote ' instead of escape double quotes \" }
Create simple hcl file
example.tf
:Run:
cat example.tf | hclq get --raw 'data.foo.bar'
Expect:
Get:
This 2 scenarios would work fine without problem:
or