Skip to content

Commit 3204848

Browse files
authored
fix(cli): powershell crashing on SIGINT, closes #3997 (#4007)
1 parent d96805a commit 3204848

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.changes/fix-cli-powershell.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"cli.rs": patch
3+
"cli.js": patch
4+
---
5+
6+
Fixes a Powershell crash when sending SIGINT to the dev command.

tooling/cli/src/dev.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use std::{
2525
fs::FileType,
2626
io::{BufReader, Write},
2727
path::{Path, PathBuf},
28-
process::{exit, Command},
28+
process::{exit, Command, Stdio},
2929
sync::{
3030
atomic::{AtomicBool, Ordering},
3131
mpsc::channel,
@@ -126,6 +126,7 @@ fn command_internal(options: Options) -> Result<()> {
126126
.pipe()?; // development build always includes debug information
127127
command
128128
};
129+
command.stdin(Stdio::piped());
129130

130131
let child = SharedChild::spawn(&mut command)
131132
.unwrap_or_else(|_| panic!("failed to run `{}`", before_dev));
@@ -489,7 +490,7 @@ fn start_app(
489490
}
490491

491492
command.stdout(os_pipe::dup_stdout().unwrap());
492-
command.stderr(std::process::Stdio::piped());
493+
command.stderr(Stdio::piped());
493494

494495
let child =
495496
SharedChild::spawn(&mut command).with_context(|| format!("failed to run {}", runner))?;

0 commit comments

Comments
 (0)