We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6d3d46b + b8a0dda commit 5d67261Copy full SHA for 5d67261
src/rustup-cli/common.rs
@@ -235,7 +235,7 @@ pub fn rustc_version(toolchain: &Toolchain) -> String {
235
// we guard against such cases by enforcing a reasonable timeout to read.
236
let mut line1 = None;
237
if let Ok(mut child) = cmd.spawn() {
238
- let timeout = Duration::new(1, 0);
+ let timeout = Duration::new(3, 0);
239
match child.wait_timeout(timeout) {
240
Ok(Some(status)) if status.success() => {
241
let out = child.stdout.expect("Child::stdout requested but not present");
@@ -248,6 +248,7 @@ pub fn rustc_version(toolchain: &Toolchain) -> String {
248
}
249
Ok(None) => {
250
let _ = child.kill();
251
+ return String::from("(timeout reading rustc version)")
252
253
Ok(Some(_)) | Err(_) => {}
254
0 commit comments