Skip to content

Commit 8beab63

Browse files
authored
fix(cli): build freezing on Windows, closes #3399 (#3402)
1 parent def7684 commit 8beab63

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

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 CLI freezing when running `light.exe` on Windows without the `--verbose` flag.

tooling/bundler/src/bundle/common.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::{
88
fs::{self, File},
99
io::{self, BufWriter, Write},
1010
path::Path,
11-
process::Command,
11+
process::{Command, Stdio},
1212
};
1313
use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor};
1414

@@ -198,6 +198,8 @@ pub fn print_info(message: &str) -> crate::Result<()> {
198198
pub fn execute_with_verbosity(cmd: &mut Command, settings: &Settings) -> crate::Result<()> {
199199
if settings.is_verbose() {
200200
cmd.pipe()?;
201+
} else {
202+
cmd.stdout(Stdio::null()).stderr(Stdio::null());
201203
}
202204
let status = cmd.status().expect("failed to spawn command");
203205

tooling/bundler/src/bundle/windows/msi/wix.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,7 @@ fn run_light(
343343
}
344344

345345
let mut cmd = Command::new(&light_exe);
346-
cmd
347-
.args(&args)
348-
.stdout(Stdio::piped())
349-
.current_dir(build_path);
346+
cmd.args(&args).current_dir(build_path);
350347

351348
common::execute_with_verbosity(&mut cmd, settings).map_err(|_| {
352349
crate::Error::ShellScriptError(format!(

0 commit comments

Comments
 (0)