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

Use Task generally over Command #232

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

cgwalters
Copy link
Collaborator

Especially in places where we call .output(), what we generally always want is to get stdout, but keep stderr going to the parent process stderr. The Command API doesn't make this obvious to do, and worse forces every caller to manually check the exit status.

The Task API fixes both of these.

(Now, the Task API also defaults to printing a description,
which we need suppress in many cases with .quiet())

Especially in places where we call `.output()`, what we generally
always want is to get stdout, but keep stderr going to the
parent process stderr.  The `Command` API doesn't make this
obvious to do, and worse forces every caller to manually check
the exit status.

The `Task` API fixes both of these.

(Now, the Task API also defaults to printing a description,
 which we need suppress in many cases with `.quiet()`)

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

@HuijingHei HuijingHei left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

@vrothberg vrothberg merged commit 8dc32a3 into containers:main Dec 18, 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

3 participants