Merge pull request #984 from Garrybest/pr_fix_estimator_crash

fix issue of scheduler-estimator exit
This commit is contained in:
karmada-bot 2021-11-19 10:31:06 +08:00 committed by GitHub
commit b0742b2c9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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