mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +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())
|
cliflag.PrintFlags(cmd.Flags())
|
||||||
|
|
||||||
if err := initForOS(opts.WindowsService); err != nil {
|
if err := initForOS(opts.WindowsService); err != nil {
|
||||||
klog.ErrorS(err, "Failed OS init")
|
return fmt.Errorf("failed os init: %w", err)
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := opts.Complete(); err != nil {
|
if err := opts.Complete(); err != nil {
|
||||||
klog.ErrorS(err, "Failed complete")
|
return fmt.Errorf("failed complete: %w", err)
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := opts.Validate(); err != nil {
|
if err := opts.Validate(); err != nil {
|
||||||
klog.ErrorS(err, "Failed validate")
|
return fmt.Errorf("failed validate: %w", err)
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := opts.Run(); err != nil {
|
if err := opts.Run(); err != nil {
|
||||||
@ -501,8 +498,6 @@ with the apiserver API to configure the proxy.`,
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
SilenceUsage: true,
|
|
||||||
SilenceErrors: true,
|
|
||||||
Args: func(cmd *cobra.Command, args []string) error {
|
Args: func(cmd *cobra.Command, args []string) error {
|
||||||
for _, arg := range args {
|
for _, arg := range args {
|
||||||
if len(arg) > 0 {
|
if len(arg) > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user