Commit d66d4fc
child_process: promisify includes stdio in error
This converts the initial implementation of a promised exec that used
the customPromisifyArgs support in util.promisify with a custom
implementation. This is because exec and execFile, when there is an
error, still supply the stdout and stderr of the process, and yet
the promisified version with customPromisifyArgs does
not supply this ability.
I created a custom implementation and attached it to exec and execFile
using the util.promisify.custom key.
Fixes: #13364
PR-URL: #13388
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>1 parent bf06534 commit d66d4fcCopy full SHA for d66d4fc
File tree
Expand file treeCollapse file tree
3 files changed
+52
-9
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- test/parallel
Expand file treeCollapse file tree
3 files changed
+52
-9
lines changedOpen diff view settings
Collapse file
+6-2Lines changed: 6 additions & 2 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
215 | 215 | |
216 | 216 | |
217 | 217 | |
218 | | - |
| 218 | + |
| 219 | + |
| 220 | + |
219 | 221 | |
220 | 222 | |
221 | 223 | |
| ||
281 | 283 | |
282 | 284 | |
283 | 285 | |
284 | | - |
| 286 | + |
| 287 | + |
| 288 | + |
285 | 289 | |
286 | 290 | |
287 | 291 | |
|
Collapse file
+27-7Lines changed: 27 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
22 | 22 | |
23 | 23 | |
24 | 24 | |
25 | | - |
26 | | - |
27 | | - |
| 25 | + |
| 26 | + |
| 27 | + |
28 | 28 | |
29 | 29 | |
30 | 30 | |
| ||
140 | 140 | |
141 | 141 | |
142 | 142 | |
143 | | - |
144 | | - |
| 143 | + |
| 144 | + |
| 145 | + |
145 | 146 | |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
146 | 164 | |
147 | 165 | |
148 | 166 | |
| ||
338 | 356 | |
339 | 357 | |
340 | 358 | |
341 | | - |
342 | | - |
| 359 | + |
| 360 | + |
| 361 | + |
| 362 | + |
343 | 363 | |
344 | 364 | |
345 | 365 | |
|
Collapse file
test/parallel/test-child-process-promisified.js
Copy file name to clipboardExpand all lines: test/parallel/test-child-process-promisified.js+19Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
32 | 32 | |
33 | 33 | |
34 | 34 | |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
0 commit comments