-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Change the way you indicate you want a Buffer #480
Comments
I just found out that
> child_process.execSync('echo oh', {encoding: 'buffer'})
<Buffer 6f 68 0a> Unrecognized character encodings do behave the same, but only with
Interestingly enough, the It turns out we accidentally supported I do think a boolean option like I just fixed this with #572. |
Agreed. Although, I would prefer to remove support for |
Update: due to discussion #586, we are now considering removing |
Setting
{encoding: null}
is such a weird API I should never have inherited fromchildProcess
.We can introduce a new way while still supporting the old way.
Some possible solutions:
{encoding: 'buffer'}
(It's not technically an encoding, but who cares?){returnValue: 'string' | 'buffer'}
In Got, we went with
{buffer: Boolean}
, but we already use that option name for something else.The text was updated successfully, but these errors were encountered: