Fix: not change the error messages

This commit is contained in:
sanposhiho 2021-08-22 21:18:18 +09:00
parent b8ae016ee6
commit a06d6138b5
2 changed files with 4 additions and 4 deletions

View File

@ -81,10 +81,10 @@ See [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/)
for more information about scheduling and the kube-scheduler component.`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := opts.Complete(&namedFlagSets); err != nil {
return fmt.Errorf("completes the remaining instantiation of the options: %w", err)
return err
}
if err := runCommand(cmd, opts, registryOptions...); err != nil {
return fmt.Errorf("run command: %w", err)
return err
}
return nil
},

View File

@ -34,7 +34,7 @@ import (
func main() {
if err := runSchedulerCmd(); err != nil {
fmt.Fprintf(os.Stderr, "failed to run scheduler command: %v\n", err)
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1)
}
}
@ -50,7 +50,7 @@ func runSchedulerCmd() error {
defer logs.FlushLogs()
if err := command.Execute(); err != nil {
return fmt.Errorf("execute command: %w", err)
return err
}
return nil