From 65ef4b7ec5a684a9393d565b5408ebe7ce8826e1 Mon Sep 17 00:00:00 2001 From: Maor Date: Thu, 20 Dec 2018 15:48:34 +0200 Subject: [PATCH] [diff/env] default output to yaml --- pkg/orca/env.go | 2 +- pkg/utils/chart.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/orca/env.go b/pkg/orca/env.go index 4043f2d..7f10e00 100644 --- a/pkg/orca/env.go +++ b/pkg/orca/env.go @@ -506,7 +506,7 @@ func NewDiffEnvCmd(out io.Writer) *cobra.Command { f.StringVar(&e.nameRight, "name-right", os.Getenv("ORCA_NAME_RIGHT"), "name of right environment to compare. Overrides $ORCA_NAME_RIGHT") f.StringVar(&e.kubeContextLeft, "kube-context-left", os.Getenv("ORCA_KUBE_CONTEXT_LEFT"), "name of the left kubeconfig context to use. Overrides $ORCA_KUBE_CONTEXT_LEFT") f.StringVar(&e.kubeContextRight, "kube-context-right", os.Getenv("ORCA_KUBE_CONTEXT_RIGHT"), "name of the right kubeconfig context to use. Overrides $ORCA_KUBE_CONTEXT_RIGHT") - f.StringVarP(&e.output, "output", "o", os.Getenv("ORCA_OUTPUT"), "output format (yaml, md, table). Overrides $ORCA_OUTPUT") + f.StringVarP(&e.output, "output", "o", utils.GetStringEnvVar("ORCA_OUTPUT", "yaml"), "output format (yaml, table). Overrides $ORCA_OUTPUT") return cmd } diff --git a/pkg/utils/chart.go b/pkg/utils/chart.go index 87da00f..dce2eee 100644 --- a/pkg/utils/chart.go +++ b/pkg/utils/chart.go @@ -359,7 +359,7 @@ func PrintDiff(o DiffOptions) { case "table": printDiffTable(o, diffs) case "": - printDiffTable(o, diffs) + printDiffYaml(diffs) } }