Skip to content

Commit

Permalink
provider meta: don't return providers with invalid names (#35842)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcervante authored Oct 14, 2024
1 parent 698cb0d commit acb805e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/configs/provider_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ func decodeProviderMetaBlock(block *hcl.Block) (*ProviderMeta, hcl.Diagnostics)
}

// verify that the local name is already localized or produce an error.
diags = append(diags, checkProviderNameNormalized(block.Labels[0], block.DefRange)...)
nameDiags := checkProviderNameNormalized(block.Labels[0], block.DefRange)
diags = append(diags, nameDiags...)
if nameDiags.HasErrors() {
return nil, diags
}

return &ProviderMeta{
Provider: block.Labels[0],
Expand Down

0 comments on commit acb805e

Please sign in to comment.