Merge pull request #82477 from haoshuwei/add-missing-err-return
fix some missing errors return statements Kubernetes-commit: 5b496d2a25de5bd65512d8c8034f1cbc49e05b4d
This commit is contained in:
commit
985e123003
|
@ -250,6 +250,9 @@ func (o *ApplyOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error {
|
|||
|
||||
o.OpenAPISchema, _ = f.OpenAPISchema()
|
||||
o.Validator, err = f.Validator(cmdutil.GetFlagBool(cmd, "validate"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
o.Builder = f.NewBuilder()
|
||||
o.Mapper, err = f.ToRESTMapper()
|
||||
if err != nil {
|
||||
|
|
|
@ -181,6 +181,9 @@ func (o *LabelOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []st
|
|||
}
|
||||
o.resources = resources
|
||||
o.newLabels, o.removeLabels, err = parseLabels(labelArgs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if o.list && len(o.outputFormat) > 0 {
|
||||
return fmt.Errorf("--list and --output may not be specified together")
|
||||
|
|
Loading…
Reference in New Issue