Skip to content

Commit

Permalink
Use logger that always write on describe command
Browse files Browse the repository at this point in the history
Signed-off-by: Joao Pereira <[email protected]>
  • Loading branch information
joaopapereira committed Oct 24, 2023
1 parent 6e1758a commit 34440d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/imgpkg/cmd/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (d *DescribeOptions) Run() error {
logLevel := util.LogWarn

levelLogger := util.NewUILevelLogger(logLevel, util.NewLogger(d.ui))
ttyEnabledLogger := util.NewUILevelLogger(logLevel, util.NewLoggerNoTTY(d.ui))
description, err := v1.Describe(
d.BundleFlags.Bundle,
v1.DescribeOpts{
Expand All @@ -79,10 +80,10 @@ func (d *DescribeOptions) Run() error {
}

if d.OutputType == "text" {
p := bundleTextPrinter{logger: levelLogger}
p := bundleTextPrinter{logger: ttyEnabledLogger}
p.Print(description)
} else if d.OutputType == "yaml" {
p := bundleYAMLPrinter{logger: util.NewUILevelLogger(logLevel, util.NewLoggerNoTTY(d.ui))}
p := bundleYAMLPrinter{logger: ttyEnabledLogger}
return p.Print(description)
}
return nil
Expand Down

0 comments on commit 34440d0

Please sign in to comment.