Skip to content

Add an abstraction to std::io::process for dealing with error gracefully #10669

Closed
@emberian

Description

@emberian

A very common pattern when dealing with subprocesses is, when they fail, to print out or log some diagnostics. Lots of code that uses std::run rolls their own version of this. This shouldn't live in the stdlib, I think. Ideally a really nice CLI library would live in the extra conglomerate. For now, developing it as a separate crate and then merging it into libextra temporarily would be good.

Examples that this would ideally replace:

https://github.com/huonw/multibuilder/blob/master/git.rs#L36 (and bunch elsewhere in this file)
https://github.com/huonw/multibuilder/blob/master/git.rs#L108
alexcrichton@cff13ae#diff-88c3a4f09e02361c7490165aacee98dfR41

(I'm sure many more can be found in other codebases)

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions