Move marked check above null check

This commit is contained in:
Pam Selle 2020-10-05 13:29:51 -04:00
parent c57ca152e6
commit 6440c83947
1 changed files with 3 additions and 3 deletions

View File

@ -16,6 +16,9 @@ func FormatValue(v cty.Value, indent int) string {
if !v.IsKnown() { if !v.IsKnown() {
return "(known after apply)" return "(known after apply)"
} }
if v.IsMarked() {
return "(sensitive)"
}
if v.IsNull() { if v.IsNull() {
ty := v.Type() ty := v.Type()
switch { switch {
@ -37,9 +40,6 @@ func FormatValue(v cty.Value, indent int) string {
return fmt.Sprintf("null /* %s */", ty.FriendlyName()) return fmt.Sprintf("null /* %s */", ty.FriendlyName())
} }
} }
if v.IsMarked() {
return "(sensitive)"
}
ty := v.Type() ty := v.Type()
switch { switch {