Skip to content

Command::status method doesn't say when it will return an Err(...) #108213

Open
@yaymukund

Description

@yaymukund

Location

rustdocs for std

Summary

I think the following methods:

Command::spawn(&mut self)
Command::output(&mut self)
Command::status(&mut self)
Child::wait(&mut self)
Child::try_wait(&mut self)
Child::wait_with_output(self)

ought to mention when they will exit with an Err(_). From a discussion in the community Discord:

"nils, supposedly one of the many: they will error when the command is not found
nils, supposedly one of the many: well
nils, supposedly one of the many: there are probably other conditions than "command not found"
nils, supposedly one of the many: just in general when it failed to spawn it
nils, supposedly one of the many: which can happen for all kinds of issues"

Maybe it should be a module level doc to avoid duplication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-processArea: `std::process` and `std::env`T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions