oven-sh/bun

Bun write from empty Response doesn't create any file.

Chiusa

#6827 aperta il 31 ott 2023

 (2 commenti) (1 reazione) (0 assegnatari)Rust (4486 fork)batch import
bugbun.jsconfirmed buggood first issue

Metriche repository

Star
 (90.348 stelle)
Metriche merge PR
 (Merge medio 1g 17h) (357 PR mergiate in 30 g)

Descrizione

What version of Bun is running?

1.0.8+732650d6a43d235d36a9bf8717766e012f445461

What platform is your computer?

Linux 6.5.9-1-cachyos x86_64 unknown

What steps can reproduce the bug?

Bun.write("ok.txt", new Response(""));

What is the expected behavior?

An empty file ok.txt will be created in the current directory.

What do you see instead?

No file is created.

Additional information

This doesn't happen on passing empty string.

Bun.write("ok.txt", "");

This generates the empty file successfully.

Guida contributor