diff --git a/pkg/kubectl/cmd/cmd.go b/pkg/kubectl/cmd/cmd.go index e5c13f93711..83979c90a02 100644 --- a/pkg/kubectl/cmd/cmd.go +++ b/pkg/kubectl/cmd/cmd.go @@ -249,7 +249,7 @@ Find more information at https://github.com/kubernetes/kubernetes.`, NewCmdCreate(f, out), NewCmdExposeService(f, out), NewCmdRun(f, in, out, err), - set.NewCmdSet(f, out), + set.NewCmdSet(f, out, err), }, }, { diff --git a/pkg/kubectl/cmd/set/set.go b/pkg/kubectl/cmd/set/set.go index c377a9b0238..23243119b52 100644 --- a/pkg/kubectl/cmd/set/set.go +++ b/pkg/kubectl/cmd/set/set.go @@ -32,7 +32,7 @@ var ( set_example = dedent.Dedent(``) ) -func NewCmdSet(f cmdutil.Factory, out io.Writer) *cobra.Command { +func NewCmdSet(f cmdutil.Factory, out, err io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "set SUBCOMMAND", @@ -45,7 +45,7 @@ func NewCmdSet(f cmdutil.Factory, out io.Writer) *cobra.Command { } // add subcommands - cmd.AddCommand(NewCmdImage(f, out)) + cmd.AddCommand(NewCmdImage(f, out, err)) return cmd } diff --git a/pkg/kubectl/cmd/set/set_image.go b/pkg/kubectl/cmd/set/set_image.go index 8f245d295ea..fdfb00d6fb1 100644 --- a/pkg/kubectl/cmd/set/set_image.go +++ b/pkg/kubectl/cmd/set/set_image.go @@ -78,9 +78,10 @@ var ( kubectl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml`) ) -func NewCmdImage(f cmdutil.Factory, out io.Writer) *cobra.Command { +func NewCmdImage(f cmdutil.Factory, out, err io.Writer) *cobra.Command { options := &ImageOptions{ Out: out, + Err: err, } cmd := &cobra.Command{