Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] missing quote in get with raw flag #21

Open
caongocthai opened this issue Oct 24, 2019 · 0 comments
Open

[Bug] missing quote in get with raw flag #21

caongocthai opened this issue Oct 24, 2019 · 0 comments

Comments

@caongocthai
Copy link

caongocthai commented Oct 24, 2019

Create simple hcl file example.tf:

data "foo" {
  "bar" = "        - \"one\"\n        - \"-two\"\n        - \"three\""
}

Run: 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 \"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant