fix some missing errors return statements
Signed-off-by: haoshuwei <haoshuwei24@gmail.com> Kubernetes-commit: c4fe8f11b200d0a97e8ce447e5af592b5c4870d0
This commit is contained in:
parent
973ea8de57
commit
4dd9f90e6e
|
@ -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