From 9c8c59ab2cf69998728d8e919fc03dd37b29ee48 Mon Sep 17 00:00:00 2001 From: zzxwill Date: Wed, 5 Aug 2020 11:28:45 +0800 Subject: [PATCH] check Marshal error --- pkg/cmd/status.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/status.go b/pkg/cmd/status.go index 5cade0a65..4edbd6dd0 100644 --- a/pkg/cmd/status.go +++ b/pkg/cmd/status.go @@ -44,10 +44,11 @@ func printApplicationStatus(ctx context.Context, c client.Client, ioStreams cmdu if err != nil { return err } - // TODO(zzxwill) When application.Trait.Name is "", find a way not to print trait status out, err := yaml.Marshal(application) - + if err != nil { + return err + } ioStreams.Info(string(out)) return nil }