From b6cf1c3673d12b714f40bc2389797444c091535d Mon Sep 17 00:00:00 2001 From: FGtatsuro <204491+FGtatsuro@users.noreply.github.com> Date: Mon, 3 Aug 2020 00:33:35 +0900 Subject: [PATCH] Use valid heredoc begin symbol in diff output. --- command/format/diff.go | 2 +- command/format/diff_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/command/format/diff.go b/command/format/diff.go index 2e4208ff0..6ac58cbd7 100644 --- a/command/format/diff.go +++ b/command/format/diff.go @@ -733,7 +733,7 @@ func (p *blockBodyDiffPrinter) writeValueDiff(old, new cty.Value, indent int, pa break } - p.buf.WriteString("<<~EOT") + p.buf.WriteString("<<-EOT") if p.pathForcesNewResource(path) { p.buf.WriteString(p.color.Color(forcesNewResourceCaption)) } diff --git a/command/format/diff_test.go b/command/format/diff_test.go index 3c6e6460b..fad069b83 100644 --- a/command/format/diff_test.go +++ b/command/format/diff_test.go @@ -222,7 +222,7 @@ new line ExpectedOutput: ` # test_instance.example will be updated in-place ~ resource "test_instance" "example" { ~ id = "i-02ae66f368e8518a9" -> (known after apply) - ~ more_lines = <<~EOT + ~ more_lines = <<-EOT original + new line EOT @@ -253,7 +253,7 @@ new line ExpectedOutput: ` # test_instance.example will be updated in-place ~ resource "test_instance" "example" { ~ id = "i-02ae66f368e8518a9" -> (known after apply) - + more_lines = <<~EOT + + more_lines = <<-EOT original new line EOT @@ -287,7 +287,7 @@ new line ExpectedOutput: ` # test_instance.example must be replaced -/+ resource "test_instance" "example" { ~ id = "i-02ae66f368e8518a9" -> (known after apply) - ~ more_lines = <<~EOT # forces replacement + ~ more_lines = <<-EOT # forces replacement original + new line EOT