Skip to content

Commit

Permalink
changes are now decoded with marks
Browse files Browse the repository at this point in the history
  • Loading branch information
jbardin committed May 12, 2021
1 parent 1e7e6e6 commit adf6ff7
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions command/format/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@ func ResourceChange(
changeV.Change.Before = objchange.NormalizeObjectFromLegacySDK(changeV.Change.Before, schema)
changeV.Change.After = objchange.NormalizeObjectFromLegacySDK(changeV.Change.After, schema)

// Now that the change is decoded, add back the marks at the defined paths
if len(change.BeforeValMarks) > 0 {
changeV.Change.Before = changeV.Change.Before.MarkWithPaths(change.BeforeValMarks)
}
if len(change.AfterValMarks) > 0 {
changeV.Change.After = changeV.Change.After.MarkWithPaths(change.AfterValMarks)
}

result := p.writeBlockBodyDiff(schema, changeV.Before, changeV.After, 6, path)
if result.bodyWritten {
buf.WriteString("\n")
Expand Down

0 comments on commit adf6ff7

Please sign in to comment.