Commit 6958db9c authored by AdoHe's avatar AdoHe

fix config view output bug

parent a907794c
...@@ -67,6 +67,10 @@ func NewCmdConfigView(out io.Writer, ConfigAccess ConfigAccess) *cobra.Command { ...@@ -67,6 +67,10 @@ func NewCmdConfigView(out io.Writer, ConfigAccess ConfigAccess) *cobra.Command {
fmt.Printf("--output wide is not available in kubectl config view; reset to default output format (%s)\n\n", defaultOutputFormat) fmt.Printf("--output wide is not available in kubectl config view; reset to default output format (%s)\n\n", defaultOutputFormat)
cmd.Flags().Set("output", defaultOutputFormat) cmd.Flags().Set("output", defaultOutputFormat)
} }
if outputFormat == "" {
fmt.Printf("reset to default output format (%s) as --output is empty", defaultOutputFormat)
cmd.Flags().Set("output", defaultOutputFormat)
}
printer, _, err := cmdutil.PrinterForCommand(cmd) printer, _, err := cmdutil.PrinterForCommand(cmd)
cmdutil.CheckErr(err) cmdutil.CheckErr(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment