Skip to content

Commit c9ccd19

Browse files
committed
squash: flip !encoding -> encoding
1 parent 7059a85 commit c9ccd19

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/child_process.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,12 @@ exports.execFile = function(file /*, args, options, callback*/) {
179179
// merge chunks
180180
var stdout;
181181
var stderr;
182-
if (!encoding) {
183-
stdout = Buffer.concat(_stdout);
184-
stderr = Buffer.concat(_stderr);
185-
} else {
182+
if (encoding) {
186183
stdout = _stdout;
187184
stderr = _stderr;
185+
} else {
186+
stdout = Buffer.concat(_stdout);
187+
stderr = Buffer.concat(_stderr);
188188
}
189189

190190
if (ex) {
@@ -255,10 +255,10 @@ exports.execFile = function(file /*, args, options, callback*/) {
255255
ex = new Error('stdout maxBuffer exceeded');
256256
kill();
257257
} else {
258-
if (!encoding)
259-
_stdout.push(chunk);
260-
else
258+
if (encoding)
261259
_stdout += chunk;
260+
else
261+
_stdout.push(chunk);
262262
}
263263
});
264264
}
@@ -274,10 +274,10 @@ exports.execFile = function(file /*, args, options, callback*/) {
274274
ex = new Error('stderr maxBuffer exceeded');
275275
kill();
276276
} else {
277-
if (!encoding)
278-
_stderr.push(chunk);
279-
else
277+
if (encoding)
280278
_stderr += chunk;
279+
else
280+
_stderr.push(chunk);
281281
}
282282
});
283283
}

0 commit comments

Comments
 (0)