From 561b1852214c982a64ec0c941550db34f2ef08d4 Mon Sep 17 00:00:00 2001 From: Bryce Lampe Date: Mon, 22 Apr 2024 11:22:36 -0700 Subject: [PATCH] Don't log empty status or errors --- provider/internal/cli.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/provider/internal/cli.go b/provider/internal/cli.go index c48829d..5394836 100644 --- a/provider/internal/cli.go +++ b/provider/internal/cli.go @@ -179,8 +179,12 @@ func (c *cli) tail(ctx provider.Context) { if c.dumplogs { // Persist the full Docker output on error for easier debugging. - ctx.Log(diag.Info, b.String()) - ctx.Log(diag.Error, c.err.String()) + if b.Len() > 0 { + ctx.Log(diag.Info, b.String()) + } + if c.err.Len() > 0 { + ctx.Log(diag.Error, c.err.String()) + } } }