Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix wrong truncation on fs.writeFileSync with fd argument #10225

Merged
merged 3 commits into from
Apr 12, 2024

Conversation

gvilums
Copy link
Contributor

@gvilums gvilums commented Apr 12, 2024

What does this PR do?

Makes it so that using writeFile and writeFileSync with a file descriptor as an argument doesn't truncate the file after every write.

Fixes #10219
Fixes #10222

How did you verify your code works?

Added a test

Copy link
Contributor

Copy link
Contributor

@autofix-ci[bot] 1 files with test failures on bun-darwin-aarch64:

View test output

#10db46ac4d86518e13a3ed28bc8f616b440e9d64

Copy link
Contributor

@gvilums gvilums merged commit 22d6227 into main Apr 12, 2024
27 of 32 checks passed
@gvilums gvilums deleted the georgijs/write-truncate branch April 12, 2024 20:02
cirospaciari pushed a commit that referenced this pull request Apr 14, 2024
* fix wrong truncate

* close fd in test

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant