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

improper parsing of arguments after CMD #79

Open
wholtz opened this issue Jul 6, 2023 · 2 comments
Open

improper parsing of arguments after CMD #79

wholtz opened this issue Jul 6, 2023 · 2 comments

Comments

@wholtz
Copy link

wholtz commented Jul 6, 2023

I expect this to show the grep help:

$ podman-hpc run -it --rm debian:bookworm-slim grep --help
Run a command in a new container

Description:
  Runs a command in a new container from the given image

Usage:
  podman-hpc run [options] IMAGE [COMMAND [ARG...]]
....
@lastephey
Copy link
Collaborator

I agree that it would be preferable to reproduce the podman behavior

(base) DOE-7616476:~ stephey$ podman run -it --rm debian:bookworm-slim grep --help
Usage: grep [OPTION]... PATTERNS [FILE]...
Search for PATTERNS in each FILE.
Example: grep -i 'hello world' menu.h main.c
PATTERNS can contain multiple patterns separated by newlines.

Pattern selection and interpretation:
  -E, --extended-regexp     PATTERNS are extended regular expressions
  -F, --fixed-strings       PATTERNS are strings
  -G, --basic-regexp        PATTERNS are basic regular expressions
  -P, --perl-regexp         PATTERNS are Perl regular expressions
  -e, --regexp=PATTERNS     use PATTERNS for matching
  -f, --file=FILE           take PATTERNS from FILE
  -i, --ignore-case         ignore case distinctions in patterns and data
      --no-ignore-case      do not ignore case distinctions (default)
  -w, --word-regexp         match only whole words
  -x, --line-regexp         match only whole lines
  -z, --null-data           a data line ends in 0 byte, not newline
...

I don't know how easy this is. @danfulton what do you think?

@danfulton
Copy link
Member

We could probably add a -- syntax as a work around, so that at least this can be controlled in cases where there are errors, and that would be fairly easy. I think addressing the underlying problem is a larger issue that requires a fairly significant refactor.

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

No branches or pull requests

3 participants