fix parse resource in setting selector
This commit is contained in:
@@ -116,6 +116,10 @@ func (o *SelectorOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args [
|
||||
mapper, _ := f.Object()
|
||||
o.mapper = mapper
|
||||
o.encoder = f.JSONEncoder()
|
||||
o.resources, o.selector, err = getResourcesAndSelector(args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.builder = f.NewBuilder(!o.local).
|
||||
ContinueOnError().
|
||||
@@ -135,8 +139,6 @@ func (o *SelectorOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args [
|
||||
o.ClientForMapping = func(mapping *meta.RESTMapping) (resource.RESTClient, error) {
|
||||
return f.ClientForMapping(mapping)
|
||||
}
|
||||
|
||||
o.resources, o.selector, err = getResourcesAndSelector(args)
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user