mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #27710 from hashicorp/paddy_empty_diags
Fix empty diags not getting associated with source.
This commit is contained in:
commit
6e72b04cbc
@ -65,7 +65,7 @@ func ProtoToDiagnostics(ds []*proto.Diagnostic) tfdiags.Diagnostics {
|
||||
var newDiag tfdiags.Diagnostic
|
||||
|
||||
// if there's an attribute path, we need to create a AttributeValue diagnostic
|
||||
if d.Attribute != nil {
|
||||
if d.Attribute != nil && len(d.Attribute.Steps) > 0 {
|
||||
path := AttributePathToPath(d.Attribute)
|
||||
newDiag = tfdiags.AttributeValue(severity, d.Summary, d.Detail, path)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user