Open silverbucket opened 2 months ago
Does the error occur in the latest Deno version as well? I recall there being a fix for that a while back. You can upgrade to the latest Deno version by running deno upgrade
.
@silverbucket It's not reproducible with the last version.
@silverbucket It's not reproducible with the last version.
@silverbucket @marvinhagemeister
Tell me how to correctly reproduce that.
Nvm, I can reliably reproduce it in the latest version too. These are the reproduction steps:
deno init
deno test --coverage
deno coverage | echo "foo"
-> PanicPast related issue for deno -h
https://github.com/denoland/deno/issues/22863
but I thought issue on
$ deno task coverage
so I should add task with name coverage and this task do 'deno coverage | dun run mod.ts' and I tried that, and I run it task and everything works no panic
and I tried ur steps and also, I didn't faced panic
Check the original issue description. Whenever you call deno task
, deno prints out the resolved commands that will be run. That part is shown in the opening comment.
Looking at your screenshot it looks like you're running into a different error unrelated to the one described in this issue. The test command already fails, which it shouldn't and the coverage command bails out as well.
@marvinhagemeister
Hi, the issue we can't use println!
statement inside the BrokenPipe
so I can't find solution nether than use an Alternative Output Channel like use eprintln!
instead of println!
to write the error message to stderr
. This stream is usually not affected by a broken pipe in stdout.
or use logging,
Or we can ignore the BrokenPipe
error entirely or print error message the The pipe is being closed.
Hi, the issue we can't use
println!
statement inside theBrokenPipe
so I can't find solution nether than use an Alternative Output Channel like useeprintln!
instead ofprintln!
to write the error message tostderr
. This stream is usually not affected by a broken pipe instdout.
or use logging, Or we can ignore theBrokenPipe
error entirely or print error message theThe pipe is being closed.
@marvinhagemeister @bartlomieju @dsherret
I have a workaround in the form of a custom println to handle errors. I will handle BrokenPipe problems by using another channel to print arag, and for other errors, I will output them as is.
is that acceptable?
Version: Deno 1.45.5 Platform: Max OS X 14.6.1
I accidentally typo'd in the command I wanted to pipe the output of coverage to. This generated a panic by Deno.