Skip to content

Conversation

@cgwalters
Copy link
Collaborator

When I added the Task stuff it wasn't with the idea that we'd use it for all subprocess invocations.

I think in some cases we really just do want a Command instance without the extra wrappering.

Add an implementation (there are many of variants of this out there in lots of Rust codebases)

This makes sense to use instead of Task where we're using .quiet() so that we don't print the description, and especially where we don't expect the task to fail usually, so it's OK if the error message is odd.

When I added the `Task` stuff it wasn't with the idea
that we'd use it for *all* subprocess invocations.

I think in some cases we really just do want a `Command` instance
without the extra wrappering.

Add an implementation (there are many of variants of this out
there in lots of Rust codebases)

This makes sense to use instead of `Task` where we're using
`.quiet()` so that we don't print the description, and especially
where we don't expect the task to fail usually, so it's OK
if the error message is odd.

Signed-off-by: Colin Walters <walters@verbum.org>
@github-actions github-actions bot added the area/install Issues related to `bootc install` label Jul 25, 2024
fn run(&mut self) -> Result<()>;
}

impl CommandRunExt for Command {
Copy link
Contributor

Choose a reason for hiding this comment

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

I see you are using Command::new and not CommandRunExt above. I am not sure I follow how this gets wired. I imagine that now everytime someone uses Command::new it will use this instead, but have no idea how that is happening.

Copy link
Contributor

Choose a reason for hiding this comment

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

mmm I guess it's using trait and then the impl that wires this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right, the trait adds a new method.

Copy link
Contributor

@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 8d87d2a into bootc-dev:main Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install Issues related to `bootc install`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants