Commit 4ee863d
child_process: allow buffer encoding in spawnSync
When the 'buffer' encoding is passed to spawnSync(), an exception
is thrown in Buffer's toString() method because 'buffer' is not
a valid encoding there. This commit special cases the 'buffer'
encoding.
Fixes: #6930
PR-URL: #6939
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>1 parent 426aa0a commit 4ee863dCopy full SHA for 4ee863d
File tree
Expand file treeCollapse file tree
3 files changed
+26
-1
lines changedOpen diff view settings
Filter options
- lib
- test
- parallel
Expand file treeCollapse file tree
3 files changed
+26
-1
lines changedOpen diff view settings
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
428 | 428 | |
429 | 429 | |
430 | 430 | |
431 | | - |
| 431 | + |
432 | 432 | |
433 | 433 | |
434 | 434 | |
|
Collapse file
+11Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
237 | 237 | |
238 | 238 | |
239 | 239 | |
| 240 | + |
| 241 | + |
| 242 | + |
| 243 | + |
| 244 | + |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | + |
| 250 | + |
240 | 251 | |
241 | 252 | |
242 | 253 | |
|
Collapse file
test/parallel/test-child-process-spawnsync.js
Copy file name to clipboardExpand all lines: test/parallel/test-child-process-spawnsync.js+14Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
33 | 33 | |
34 | 34 | |
35 | 35 | |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
0 commit comments