Skip to content

UPSTREAM: cobra loses arguments with same value as subcommand#1901

Merged
openshift-bot merged 1 commit intoopenshift:masterfrom
deads2k:deads-osadm-not-openshift-admin
Apr 24, 2015
Merged

UPSTREAM: cobra loses arguments with same value as subcommand#1901
openshift-bot merged 1 commit intoopenshift:masterfrom
deads2k:deads-osadm-not-openshift-admin

Conversation

@deads2k
Copy link
Contributor

@deads2k deads2k commented Apr 24, 2015

Fixes: #1894
Fixes: #1447
Upstream: spf13/cobra#95

running a command like:

openshift admin policy add-role-to-user admin my-user

where admin and my-user are arguments to the openshift admin policy add-role-to-user command, removes the admin argument (args[4]).

This pull stops removing more than one token from the args for command matches.

@fabianofranz ptal

@fabianofranz
Copy link
Member

Seems a duplicate: #1447

@deads2k
Copy link
Contributor Author

deads2k commented Apr 24, 2015

Seems a duplicate: #1447

Mine has a patch :)

@fabianofranz
Copy link
Member

LGTM. Could add a test.

@fabianofranz
Copy link
Member

Actually the test should be upstream.

@deads2k
Copy link
Contributor Author

deads2k commented Apr 24, 2015

will add the test upstream. [merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/1669/) (Image: devenv-fedora_1355)

@openshift-bot
Copy link
Contributor

Evaluated for origin up to 1dad834

openshift-bot pushed a commit that referenced this pull request Apr 24, 2015
@openshift-bot openshift-bot merged commit e7c12c0 into openshift:master Apr 24, 2015
@deads2k deads2k deleted the deads-osadm-not-openshift-admin branch June 11, 2015 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'openshift admin add-role-to-user' always gives error (and is vague) Cobra is eating the first argument when it matches the first original argument

3 participants