fix some missing errors return statements

Signed-off-by: haoshuwei <haoshuwei24@gmail.com>

Kubernetes-commit: c4fe8f11b200d0a97e8ce447e5af592b5c4870d0
This commit is contained in:
haoshuwei 2019-09-09 13:54:14 +08:00 committed by Kubernetes Publisher
parent 973ea8de57
commit 4dd9f90e6e
2 changed files with 6 additions and 0 deletions

View File

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

View File

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