Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add doc example for std::process::ExitStatus::success. #34794

Merged
merged 1 commit into from
Jul 15, 2016

Conversation

frewsxcv
Copy link
Member

No description provided.

@frewsxcv
Copy link
Member Author

r? @GuillaumeGomez

/// ```rust,no_run
/// use std::process::Command;
///
/// let status = Command::new("/bin/mkdir")
Copy link
Member

@retep998 retep998 Jul 13, 2016

Choose a reason for hiding this comment

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

Could this perhaps be just "mkdir"? Surely we can assume that it is in the path, and it would avoid platform specific paths. Then again, there isn't actually a mkdir program on Windows, just a command in shells like cmd or powershell.

Copy link
Member Author

Choose a reason for hiding this comment

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

Could this perhaps be just "mkdir"? Surely we can assume that it is in the path, and it would avoid platform specific paths.

Updated to just be mkdir.

Then again, there isn't actually a mkdir program on Windows, just a command in shells like cmd or powershell.

If you have a more cross platform suggestion for this example, let me know.

@frewsxcv frewsxcv force-pushed the exitstatus-success branch from 87d3ce4 to 27e44ed Compare July 13, 2016 01:32
@GuillaumeGomez
Copy link
Member

I wonder if we should put a note or something for the command.

@frewsxcv
Copy link
Member Author

For what it's worth, all the Command doc examples are in a similar scenario:

https://doc.rust-lang.org/std/process/struct.Command.html

@GuillaumeGomez
Copy link
Member

Right, I guess it's enough.

Thanks!

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 13, 2016

📌 Commit 27e44ed has been approved by GuillaumeGomez

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 15, 2016
…laumeGomez

Add doc example for `std::process::ExitStatus::success`.

None
bors added a commit that referenced this pull request Jul 15, 2016
Rollup of 7 pull requests

- Successful merges: #34456, #34733, #34777, #34794, #34799, #34804, #34818
- Failed merges: #33951
@bors bors merged commit 27e44ed into rust-lang:master Jul 15, 2016
@frewsxcv frewsxcv deleted the exitstatus-success branch October 2, 2016 23:06
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants