From 0ba28c6467dc98d00eedf3290d9f2fe1ba2681bb Mon Sep 17 00:00:00 2001 From: Kit Patella Date: Mon, 28 Oct 2024 15:51:42 -0700 Subject: [PATCH] ensure we can print yaml even if message is feature-flagged off Signed-off-by: Kit Patella --- src/cmd/package.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cmd/package.go b/src/cmd/package.go index 632022c226..be3a08b7b0 100644 --- a/src/cmd/package.go +++ b/src/cmd/package.go @@ -235,6 +235,9 @@ var packageInspectCmd = &cobra.Command{ if err != nil { return fmt.Errorf("failed to inspect package: %w", err) } + // HACK(mkcp): This init call ensures we still can still print Yaml when message is disabled. Remove when we + // release structured logged and don't have to disable message globally in pre-run. + message.InitializePTerm(logger.DestinationDefault) err = utils.ColorPrintYAML(output, nil, false) if err != nil { return err