mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Fix: change not to print error log on RunE
This commit is contained in:
parent
f80ddac1bc
commit
c169d4d4d2
@ -480,18 +480,15 @@ with the apiserver API to configure the proxy.`,
|
||||
cliflag.PrintFlags(cmd.Flags())
|
||||
|
||||
if err := initForOS(opts.WindowsService); err != nil {
|
||||
klog.ErrorS(err, "Failed OS init")
|
||||
return err
|
||||
return fmt.Errorf("failed os init: %w", err)
|
||||
}
|
||||
|
||||
if err := opts.Complete(); err != nil {
|
||||
klog.ErrorS(err, "Failed complete")
|
||||
return err
|
||||
return fmt.Errorf("failed complete: %w", err)
|
||||
}
|
||||
|
||||
if err := opts.Validate(); err != nil {
|
||||
klog.ErrorS(err, "Failed validate")
|
||||
return err
|
||||
return fmt.Errorf("failed validate: %w", err)
|
||||
}
|
||||
|
||||
if err := opts.Run(); err != nil {
|
||||
@ -501,8 +498,6 @@ with the apiserver API to configure the proxy.`,
|
||||
|
||||
return nil
|
||||
},
|
||||
SilenceUsage: true,
|
||||
SilenceErrors: true,
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
for _, arg := range args {
|
||||
if len(arg) > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user