Skip to content

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

Closed

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.

Activity

  1. added
    kind/bug
    on Mar 25, 2015
  2. fabianofranz commented on Apr 24, 2015

    @fabianofranz
    Contributor

    Fixed in #1901

  3. fabianofranz commented on Apr 28, 2015

    @fabianofranz
    Contributor

    @smarterclayton this is fixed, please close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions