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

Fix panic when enabling plugins by CLI #1377

Merged
merged 1 commit into from
May 6, 2022

Conversation

wata727
Copy link
Member

@wata727 wata727 commented May 6, 2022

Fixes #1375

In #1365, the plugin's body enabled by CLI was changed from hcl.EmptyBody to nil. hclext.Content works fine for typed nil, but causes a panic on zero values. This PR makes that Content returns an empty body content without passing it to hclext.Content.

@wata727 wata727 merged commit 42f6e94 into master May 6, 2022
@wata727 wata727 deleted the avoid_to_decode_when_body_is_nil branch May 6, 2022 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

TFLint docker bundle crashing on v0.36.1 due to Panic: reflect: call of reflect.Value.IsNil on zero Value
1 participant