Unverified Commit 13378f46 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #61462 from WanLinghao/kubectl_return_obj_fix

Automatic merge from submit-queue (batch tested with PRs 61452, 61727, 61462, 61692, 61738). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix print object should be updated error **What this PR does / why we need it**: Print object should be updated.   After this patch, it goes the same as create.go https://github.com/kubernetes/kubernetes/blob/025439988428d2b78342549419706639cd6e52a6/pkg/kubectl/cmd/create.go#L346 **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents cc859a86 83a14831
......@@ -166,7 +166,7 @@ func (c *CreateClusterRoleOptions) RunCreateRole() error {
// Create ClusterRole.
if !c.DryRun {
_, err = c.Client.ClusterRoles().Create(clusterRole)
clusterRole, err = c.Client.ClusterRoles().Create(clusterRole)
if err != nil {
return err
}
......
......@@ -286,7 +286,7 @@ func (c *CreateRoleOptions) RunCreateRole() error {
// Create role.
if !c.DryRun {
_, err = c.Client.Roles(c.Namespace).Create(role)
role, err = c.Client.Roles(c.Namespace).Create(role)
if err != nil {
return err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment