mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix(bundle): don't panic on broken pipe (#29706)
`deno bundle main.js | less` and then `Ctrl + C` caused a panic because of `Broken pipe` error.
This commit is contained in:
parent
1a8e5edd0f
commit
b64d4cb125
1 changed files with 1 additions and 4 deletions
|
@ -233,10 +233,7 @@ pub async fn bundle(
|
|||
|
||||
if let Some(stdout) = response.write_to_stdout {
|
||||
let stdout = replace_require_shim(&String::from_utf8_lossy(&stdout));
|
||||
#[allow(clippy::print_stdout)]
|
||||
{
|
||||
println!("{}", stdout);
|
||||
}
|
||||
crate::display::write_to_stdout_ignore_sigpipe(stdout.as_bytes())?;
|
||||
} else if response.errors.is_empty() {
|
||||
if bundle_flags.output_dir.is_none()
|
||||
&& std::env::var("NO_DENO_BUNDLE_HACK").is_err()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue