Skip to content

Commit 317cdfe

Browse files
committed
fix
1 parent ec33039 commit 317cdfe

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

internal/output/plaintext_fns.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ var SingularPlaintextOutputFn = func(r resource) string {
6565
return email.(string)
6666
case id != nil:
6767
return id.(string)
68+
case name != nil:
69+
return name.(string)
6870
default:
6971
return "cannot read resource"
7072
}

internal/output/resource_output.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func CmdOutput(action string, outputKind string, input []byte) (string, error) {
103103
}
104104

105105
func plaintextOutput(out string, successMessage string) string {
106-
if successMessage != "" {
106+
if strings.TrimSpace(successMessage) != "" {
107107
return fmt.Sprintf("%s%s", successMessage, out)
108108
}
109109

0 commit comments

Comments
 (0)