From 6440c839474f052d8997bb5cec19c2743e5108e6 Mon Sep 17 00:00:00 2001 From: Pam Selle <204372+pselle@users.noreply.github.com> Date: Mon, 5 Oct 2020 13:29:51 -0400 Subject: [PATCH] Move marked check above null check --- repl/format.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repl/format.go b/repl/format.go index c6ef7e93e0..0aa19efd5c 100644 --- a/repl/format.go +++ b/repl/format.go @@ -16,6 +16,9 @@ func FormatValue(v cty.Value, indent int) string { if !v.IsKnown() { return "(known after apply)" } + if v.IsMarked() { + return "(sensitive)" + } if v.IsNull() { ty := v.Type() switch { @@ -37,9 +40,6 @@ func FormatValue(v cty.Value, indent int) string { return fmt.Sprintf("null /* %s */", ty.FriendlyName()) } } - if v.IsMarked() { - return "(sensitive)" - } ty := v.Type() switch {