mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-22 05:52:23 -05:00
fix(cli): make debugging in windows work
On windows, if `stderr` or `stdin` aren't also set to `Stdio::null()` the `spawn()` fails with `The handle is invalid`, and `rustlings` thinks that there's no `rustc` installed.
This commit is contained in:
parent
da3d55ba03
commit
cc658eb288
1 changed files with 2 additions and 0 deletions
|
@ -396,6 +396,8 @@ fn rustc_exists() -> bool {
|
||||||
Command::new("rustc")
|
Command::new("rustc")
|
||||||
.args(["--version"])
|
.args(["--version"])
|
||||||
.stdout(Stdio::null())
|
.stdout(Stdio::null())
|
||||||
|
.stderr(Stdio::null())
|
||||||
|
.stdin(Stdio::null())
|
||||||
.spawn()
|
.spawn()
|
||||||
.and_then(|mut child| child.wait())
|
.and_then(|mut child| child.wait())
|
||||||
.map(|status| status.success())
|
.map(|status| status.success())
|
||||||
|
|
Loading…
Reference in a new issue