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

Inline comment in child block does not show up in body get #89

Open
vxjohanforssell opened this issue Oct 13, 2023 · 0 comments
Open

Inline comment in child block does not show up in body get #89

vxjohanforssell opened this issue Oct 13, 2023 · 0 comments

Comments

@vxjohanforssell
Copy link

This was not fixed by #31.

Version

# hcledit version
0.2.10

Comment causes issues

body get parent shows all the rows

# hcledit body get -f /etc/nomad.d/client.hcl client
client {
  meta {
    consul            = "client"
    primary_workload  = "ingress"
    availability_zone = "eu-west-1c" # This is a comment
  }
}

Comment causes the third line to dissapear from body get parent.child

# hcledit body get -f /etc/nomad.d/client.hcl client.meta
consul           = "client"
primary_workload = "ingress"

Now remove the comment and it parses the full three lines

# hcledit body get -f /etc/nomad.d/client.hcl  client.meta
consul            = "client"
primary_workload  = "ingress"
availability_zone = "eu-west-1c"
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