diff --git a/cmd/cluster/status.go b/cmd/cluster/status.go index 9f45b723..f81c5063 100644 --- a/cmd/cluster/status.go +++ b/cmd/cluster/status.go @@ -7,6 +7,7 @@ import ( "github.com/flamingo-stack/openframe-cli/internal/cluster/models" "github.com/flamingo-stack/openframe-cli/internal/cluster/ui" "github.com/flamingo-stack/openframe-cli/internal/cluster/utils" + "github.com/pterm/pterm" "github.com/spf13/cobra" "sigs.k8s.io/yaml" ) @@ -115,6 +116,9 @@ func printClusterStatus(info models.ClusterInfo, format string) error { if err != nil { return fmt.Errorf("encoding %s: %w", format, err) } - fmt.Println(string(b)) + if !pterm.PrintDebugMessages { + return nil + } + pterm.Println(string(b)) return nil } diff --git a/internal/chart/providers/argocd/fatalmanifest.go b/internal/chart/providers/argocd/fatalmanifest.go index 7126fc17..98420097 100644 --- a/internal/chart/providers/argocd/fatalmanifest.go +++ b/internal/chart/providers/argocd/fatalmanifest.go @@ -147,5 +147,5 @@ func fatalManifestError(requestedRef string, apps []Application) error { b.WriteString("The chart path does not exist at the deployed revision. " + "Inspect the application source with: kubectl describe application " + apps[0].Name + " -n argocd") } - return fmt.Errorf("%s", b.String()) + return selfDiagnosedError(b.String()) }