Skip to content

Cobra is eating the first argument when it matches the first original argument #1447

@smarterclayton

Description

@smarterclayton

#1446 added an "admin" sub command, which coincidentally is a common first argument for policy addition. It exposes a bug in cobra:

openshift admin policy add-user admin anypassword:adduser -n ui-test-project

returns arguments ["anypassword:adduser"] instead of ["admin", "anypassword:adduser"], so it looks like Cobra is getting confused and eating the first arg. Needs to be fixed.

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions