Skip to content

Conversation

@cgwalters
Copy link
Collaborator

Confusingly, today running skopeo some-unknown-command just
outputs usage information to stdout, and exits successfully.

I'll probably fix that to exit with an error, but either
way we need to handle the case where skopeo exits before we get
a reply from the socketpair.

Confusingly, today running `skopeo some-unknown-command` just
outputs usage information to stdout, and exits successfully.

I'll probably fix that to exit with an error, but either
way we need to handle the case where skopeo exits before we get
a reply from the socketpair.
cgwalters added a commit to cgwalters/skopeo that referenced this pull request Oct 29, 2021
Surprisingly, the spf13/cobra CLI parsing logic, when presented
with an unknown subcommand outputs usage to stdout
and *exits successfully*.

This is bad for both users and scripts.  Cargo cult some code
I found in podman to handle this.

Motivated by bootc-dev/containers-image-proxy-rs#1
@cgwalters
Copy link
Collaborator Author

containers/skopeo#1488

@cgwalters cgwalters merged commit 9a7c672 into bootc-dev:main Oct 29, 2021
cgwalters added a commit to cgwalters/skopeo that referenced this pull request Oct 29, 2021
Surprisingly, the spf13/cobra CLI parsing logic, when presented
with an unknown subcommand outputs usage to stdout
and *exits successfully*.

This is bad for both users and scripts.  Cargo cult some code
I found in podman to handle this.

Motivated by bootc-dev/containers-image-proxy-rs#1

Signed-off-by: Colin Walters <walters@verbum.org>
cgwalters added a commit to cgwalters/skopeo that referenced this pull request Oct 29, 2021
Surprisingly, the spf13/cobra CLI parsing logic, when presented
with an unknown subcommand outputs usage to stdout
and *exits successfully*.

This is bad for both users and scripts.  Cargo cult some code
I found in podman to handle this.

Motivated by bootc-dev/containers-image-proxy-rs#1

Signed-off-by: Colin Walters <walters@verbum.org>
cgwalters added a commit to cgwalters/skopeo that referenced this pull request Nov 2, 2021
Surprisingly, the spf13/cobra CLI parsing logic, when presented
with an unknown subcommand outputs usage to stdout
and *exits successfully*.

This is bad for both users and scripts.  Cargo cult some code
I found in podman to handle this.

Motivated by bootc-dev/containers-image-proxy-rs#1

Signed-off-by: Colin Walters <walters@verbum.org>
lsm5 pushed a commit to containers/skopeo that referenced this pull request Nov 3, 2021
Surprisingly, the spf13/cobra CLI parsing logic, when presented
with an unknown subcommand outputs usage to stdout
and *exits successfully*.

This is bad for both users and scripts.  Cargo cult some code
I found in podman to handle this.

Motivated by bootc-dev/containers-image-proxy-rs#1

Signed-off-by: Colin Walters <walters@verbum.org>
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