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

Usability: prevent "-l" with arguments #7633

Merged

Conversation

edsantiago
Copy link
Member

Add new system check confirming that "podman foo -l arg"
throws an error; and fix lots of instances where code
was not doing this check.

I'll probably need to add something similar for --all but
that can wait.

Signed-off-by: Ed Santiago [email protected]

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 14, 2020
@edsantiago edsantiago force-pushed the minus_l_with_other_args branch from 5250745 to 3f387d8 Compare September 14, 2020 21:41
Comment on lines 94 to 96
if len(args) > 0 && topOptions.Latest {
return errors.Errorf("--latest and containers cannot be used together")
}
Copy link
Member

Choose a reason for hiding this comment

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

podman top shouldn't check this. This is valid:

$ bin/podman top -l pid user
PID   USER
1     root

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, thank you. Fixed.

Comment on lines 71 to 73
if len(args) > 0 && topOptions.Latest {
return errors.Errorf("--latest and pods cannot be used together")
}
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

Add new system check confirming that "podman foo -l arg"
throws an error; and fix lots of instances where code
was not doing this check.

I'll probably need to add something similar for --all but
that can wait.

Signed-off-by: Ed Santiago <[email protected]>
@edsantiago edsantiago force-pushed the minus_l_with_other_args branch from 3f387d8 to 2583948 Compare September 14, 2020 21:50
@rhatdan
Copy link
Member

rhatdan commented Sep 15, 2020

@TomSweeneyRedHat
Copy link
Member

LGTM

@TomSweeneyRedHat
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 15, 2020
@openshift-merge-robot openshift-merge-robot merged commit e7af517 into containers:master Sep 15, 2020
edsantiago added a commit to edsantiago/libpod that referenced this pull request Sep 15, 2020
PR containers#7633 disallowed "-l" (--latest) with container args.

PR containers#7630 made changes to the "podman wait" command. The error
message it issues is inconsistent (and incompatible) with
the one required by the new BATS --help test. Fix that.

This is entirely my fault. I was aware of containers#7630, and I was
careful to check the output message format, but I was not
careful enough (I trusted my eyes, not my code).

Signed-off-by: Ed Santiago <[email protected]>
@edsantiago edsantiago deleted the minus_l_with_other_args branch September 15, 2020 19:26
@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 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. 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.

6 participants