From 9706a00b3aee62afc8d977f67615f7d12870bcb6 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Wed, 29 Aug 2018 18:54:56 -0700 Subject: [PATCH] command/format: correct alignment for multi-line values in map diff --- command/format/diff.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/format/diff.go b/command/format/diff.go index df56ef2b9..b081be73a 100644 --- a/command/format/diff.go +++ b/command/format/diff.go @@ -703,15 +703,15 @@ func (p *blockBodyDiffPrinter) writeValueDiff(old, new cty.Value, indent int, pa switch action { case plans.Create, plans.NoOp: v := new.Index(kV) - p.writeValue(v, action, 0) + p.writeValue(v, action, indent+4) case plans.Delete: oldV := old.Index(kV) newV := cty.NullVal(oldV.Type()) - p.writeValueDiff(oldV, newV, 0, path) + p.writeValueDiff(oldV, newV, indent+4, path) default: oldV := old.Index(kV) newV := new.Index(kV) - p.writeValueDiff(oldV, newV, 0, path) + p.writeValueDiff(oldV, newV, indent+4, path) } p.buf.WriteString(",\n")