mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-05 11:40:04 +00:00
Update doc of get_target_from_rustc
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
95b7c4f771
commit
96336e4dd9
1 changed files with 2 additions and 1 deletions
|
@ -98,7 +98,8 @@ pub async fn detect_targets() -> Targets {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Figure out what the host target is, from rustc or from this program's own build target
|
/// Figure out what the host target is using `rustc`.
|
||||||
|
/// If `rustc` is absent, then it would return `None`.
|
||||||
async fn get_target_from_rustc() -> Option<Box<str>> {
|
async fn get_target_from_rustc() -> Option<Box<str>> {
|
||||||
match Command::new("rustc").arg("-vV").output().await {
|
match Command::new("rustc").arg("-vV").output().await {
|
||||||
Ok(Output { status, stdout, .. }) if status.success() => Cursor::new(stdout)
|
Ok(Output { status, stdout, .. }) if status.success() => Cursor::new(stdout)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue