mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Print object should be updated which may cause potential bug.
This patch fix this. modified: pkg/kubectl/cmd/create_clusterrole.go modified: pkg/kubectl/cmd/create_role.go
This commit is contained in:
parent
3e5596321e
commit
83a148310d
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user