mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
fix config view output bug
This commit is contained in:
parent
a907794ce3
commit
6958db9c16
@ -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)
|
||||
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)
|
||||
cmdutil.CheckErr(err)
|
||||
|
Loading…
Reference in New Issue
Block a user