Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urfave/cli: fix parsing of short opts #1046

Closed
wants to merge 1 commit into from

Conversation

vrothberg
Copy link
Member

Vendor an updated version of urfave/cli to fix the parsing of short
options. Until the fix is merged upstream, vendor the code from
github.com/vrothberg/cli containing both, the latest urfave/cli and
the bug fix.

Fixes: #714
Signed-off-by: Valentin Rothberg vrothberg@suse.com

@vrothberg
Copy link
Member Author

I'll add a test to test/e2e just to make sure we don't hit that again in the future.

Vendor an updated version of urfave/cli to fix the parsing of short
options.  Until the fix is merged upstream, vendor the code from
github.com/vrothberg/cli containing both, the latest urfave/cli and
the bug fix.

Fixes: containers#714
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
@rhatdan
Copy link
Member

rhatdan commented Jul 5, 2018

LGTM

@rhatdan
Copy link
Member

rhatdan commented Jul 5, 2018

@edsantiago @mheon @baude PTAL

@giuseppe
Copy link
Member

giuseppe commented Jul 5, 2018

LGTM, is there an open PR upstream that we can link to?

@vrothberg
Copy link
Member Author

vrothberg commented Jul 5, 2018

LGTM, is there an open PR upstream that we can link to?

Yes, it's here: urfave/cli#758

@rhatdan
Copy link
Member

rhatdan commented Jul 5, 2018

@rh-atomic-bot r+

Of course @edsantiago will find a way to break this again. :^)

@rh-atomic-bot
Copy link
Collaborator

📌 Commit 0b9ee59 has been approved by rhatdan

@rh-atomic-bot
Copy link
Collaborator

⚡ Test exempted: pull fully rebased and already tested.

@vrothberg vrothberg deleted the fix-cli-args-parsing branch July 5, 2018 10:44
@vrothberg
Copy link
Member Author

Of course @edsantiago will find a way to break this again. :^)

Challenge accepted 😆

@giuseppe
Copy link
Member

giuseppe commented Jul 9, 2018

I've tried:

podman run --uidmap 0:30000:7000 --gidmap 0:30000:7000  -ti --rm alpine echo hello

and it seems that podman now enters an endless loop, I've done a quick test reverting the patch and I don't see the issue anymore. Does it happen for you as well?

@vrothberg
Copy link
Member Author

Does it happen for you as well?

Yes, you're good ;-)

@vrothberg
Copy link
Member Author

I'll have a look at it to (hopefully) prepare a patch.

@vrothberg
Copy link
Member Author

The bug is here: https://github.com/vrothberg/cli/blob/fix-short-opts-parsing/command.go#L207

Instead of adding the argument, the to-be-translated string is added.

@vrothberg
Copy link
Member Author

@giuseppe Here's the fix: #1066

I think, the challenge is open again 😆

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

arg parsing: single-dash options expanded incorrectly
4 participants