Skip to content

Commit

Permalink
use unstructured builder - oc export
Browse files Browse the repository at this point in the history
  • Loading branch information
juanvallejo committed Oct 4, 2017
1 parent afd90cd commit b276e58
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pkg/oc/cli/cmd/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,17 @@ func RunExport(f *clientcmd.Factory, exporter Exporter, in io.Reader, out io.Wri
return err
}

mapper, typer := f.Object()
b := f.NewBuilder(true).
builder, err := f.NewUnstructuredBuilder(true)
if err != nil {
return err
}

mapper, typer, err := f.UnstructuredObject()
if err != nil {
return err
}

b := builder.
NamespaceParam(cmdNamespace).DefaultNamespace().AllNamespaces(allNamespaces).
FilenameParam(explicit, &resource.FilenameOptions{Recursive: false, Filenames: filenames}).
SelectorParam(selector).
Expand Down

0 comments on commit b276e58

Please sign in to comment.