Fix `execaSync()` writing decoded text instead of the output's bytes to files
Before adoption: this commit came in with the history the project adopted, so no landing records it.
With a `{file}`, `'inherit'` or file descriptor target, synchronous methods wrote the output decoded with the `encoding` option, which was then encoded again as UTF-8. That changed the bytes: invalid UTF-8 became U+FFFD, `utf16le` output became UTF-8, and `hex` or `base64` wrote that text instead of the bytes. Like asynchronous methods, the bytes are now written as is.
authored by Sindre Sorhus · committed by Sindre Sorhus · parent ecda56b · Browse files · 2 files+29 added−5 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+29 added−5 removed
- tests:+17 added−0 removed
- other:+12 added−5 removed