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

install: Two smaller fixes #228

Merged
merged 2 commits into from
Dec 15, 2023
Merged

install: Two smaller fixes #228

merged 2 commits into from
Dec 15, 2023

Conversation

cgwalters
Copy link
Collaborator

install: Propagate skopeo stderr

We're going to need to consistently use a helper to get this right
in the future...basically most uses of .output() are wrong.

Signed-off-by: Colin Walters walters@verbum.org


install: Fix exec helper to not swallow unexpected args

Our exec-in-host-mount-namespace internal helper was intended
to be a "passthrough" that accepts whatever child arguments.

However I misunderstood how to do this in clap. Before this
change we get:

$ bootc blabla
ERROR Re-exec in host mountns: Missing command

i.e. the exec code kicks in because external_subcommand takes
over everything unknown.

Fix things to use trailing_var_arg which is intended for this case.

After this patch:

$ bootc blabla
error: unrecognized subcommand 'blabla'

Usage: bootc <COMMAND>

For more information, try '--help'.

Signed-off-by: Colin Walters walters@verbum.org


We're going to need to consistently use a helper to get this right
in the future...basically most uses of `.output()` are wrong.

Signed-off-by: Colin Walters <walters@verbum.org>
Our `exec-in-host-mount-namespace` internal helper was intended
to be a "passthrough" that accepts whatever child arguments.

However I misunderstood how to do this in clap.  Before this
change we get:

```
$ bootc blabla
ERROR Re-exec in host mountns: Missing command
```

i.e. the exec code kicks in because `external_subcommand` takes
over *everything* unknown.

Fix things to use `trailing_var_arg` which is intended for this case.

After this patch:

```
$ bootc blabla
error: unrecognized subcommand 'blabla'

Usage: bootc <COMMAND>

For more information, try '--help'.
```

Signed-off-by: Colin Walters <walters@verbum.org>
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

lgtm

@cgwalters cgwalters merged commit 2ee270f into containers:main Dec 15, 2023
10 checks passed
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.

None yet

2 participants