Skip to content

Commit cc658eb

Browse files
committed
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.
1 parent da3d55b commit cc658eb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ fn rustc_exists() -> bool {
396396
Command::new("rustc")
397397
.args(["--version"])
398398
.stdout(Stdio::null())
399+
.stderr(Stdio::null())
400+
.stdin(Stdio::null())
399401
.spawn()
400402
.and_then(|mut child| child.wait())
401403
.map(|status| status.success())

0 commit comments

Comments
 (0)