Merge pull request #984 from Garrybest/pr_fix_estimator_crash
fix issue of scheduler-estimator exit
This commit is contained in:
commit
b0742b2c9c
|
@ -27,8 +27,8 @@ func NewSchedulerEstimatorCommand(ctx context.Context) *cobra.Command {
|
|||
Long: `The karmada scheduler estimator runs an accurate scheduler estimator of a cluster`,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
// validate options
|
||||
if err := opts.Validate(); err != nil {
|
||||
return err.ToAggregate()
|
||||
if errs := opts.Validate(); len(errs) != 0 {
|
||||
return errs.ToAggregate()
|
||||
}
|
||||
if err := run(ctx, opts); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue