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

cmd/fmt: Avoid removing quotes from empty labels #26960

Closed
radeksimko opened this issue Nov 18, 2020 · 2 comments · Fixed by #26964
Closed

cmd/fmt: Avoid removing quotes from empty labels #26960

radeksimko opened this issue Nov 18, 2020 · 2 comments · Fixed by #26964
Assignees
Labels
bug confirmed a Terraform Core team member has reproduced this issue upstream v0.14 Issues (primarily bugs) reported against v0.14 releases
Milestone

Comments

@radeksimko
Copy link
Member

Terraform Version

0.14.0-beta2

Terraform Configuration Files

provider "" {
}

Expected Behavior

fmt to leave the code as is.

Actual Behavior

fmt removed quotes and therefore removed the empty label.

Steps to Reproduce

v0.13

$ echo "provider \"\" {\n}\n" | terraform fmt -
provider "" {
}

v0.14

$ echo "provider \"\" {\n}\n" | terraform fmt -
provider {
}
@radeksimko radeksimko added bug new new issue not yet triaged v0.14 Issues (primarily bugs) reported against v0.14 releases labels Nov 18, 2020
@alisdair alisdair added confirmed a Terraform Core team member has reproduced this issue and removed new new issue not yet triaged labels Nov 18, 2020
@alisdair alisdair self-assigned this Nov 18, 2020
@alisdair
Copy link
Member

Confirmed, thanks! Upstream fix is here: hashicorp/hcl#422

@ghost
Copy link

ghost commented Dec 19, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug confirmed a Terraform Core team member has reproduced this issue upstream v0.14 Issues (primarily bugs) reported against v0.14 releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants