(orig)
| 239 | } |
| 240 | |
| 241 | const customPromiseExecFunction = (orig) => { |
| 242 | return assignFunctionName(orig.name, function(...args) { |
| 243 | const { promise, resolve, reject } = PromiseWithResolvers(); |
| 244 | |
| 245 | promise.child = orig(...args, (err, stdout, stderr) => { |
| 246 | if (err !== null) { |
| 247 | err.stdout = stdout; |
| 248 | err.stderr = stderr; |
| 249 | reject(err); |
| 250 | } else { |
| 251 | resolve({ stdout, stderr }); |
| 252 | } |
| 253 | }); |
| 254 | |
| 255 | return promise; |
| 256 | }); |
| 257 | }; |
| 258 | |
| 259 | ObjectDefineProperty(exec, promisify.custom, { |
| 260 | __proto__: null, |
no test coverage detected
searching dependent graphs…