Skip to content

Fix show help when invalid option is passed to apk - #19

Closed
spk wants to merge 1 commit into
alpinelinux:masterfrom
spk:invalid-option
Closed

Fix show help when invalid option is passed to apk#19
spk wants to merge 1 commit into
alpinelinux:masterfrom
spk:invalid-option

Conversation

@spk

@spk spk commented Apr 13, 2019

Copy link
Copy Markdown

Hi,

This fix issue described in https://bugs.alpinelinux.org/issues/10157

Cheers,
Laurent

@spk
spk force-pushed the invalid-option branch from 240f860 to bdd1474 Compare April 15, 2019 19:38
Comment thread src/apk.c
r = optgroups[i]->parse(ctx, &dbopts, p, optarg);
if (r == 0) break;
if (r == -EINVAL) {
if (r == -EPERM) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No applet ever returns EPERM. It would be then better to revert 5da4dec but it was supposed fix --help --verbose. This patch breaks again that case. Something different seems to be needed for proper fix.

algitbot pushed a commit that referenced this pull request Jun 5, 2019
Add also some testing to make sure help, long help and handling
of invalid arguments works as expected.

Based on pull request #19 originally by Laurent Arnoud (@spk).
@fabled

fabled commented Jun 5, 2019

Copy link
Copy Markdown
Contributor

Fixed in the other commit.

@fabled fabled closed this Jun 5, 2019
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.

2 participants