aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2023-01-23 15:59:45 -0800
committerGravatar GitHub <noreply@github.com> 2023-01-23 15:59:45 -0800
commit79c0b614ee04d06d9565cd52450b0de1f58fa87e (patch)
tree3bd01e49d3f6ecb3e04bf3ff71552b5c14bf0298 /src
parentf5cda8ff1871571e3a6e655326fcda56e65e0dfb (diff)
downloadbun-79c0b614ee04d06d9565cd52450b0de1f58fa87e.tar.gz
bun-79c0b614ee04d06d9565cd52450b0de1f58fa87e.tar.zst
bun-79c0b614ee04d06d9565cd52450b0de1f58fa87e.zip
fix child process node test hang (#1884)
* fix test hang from skipped tests * add error target
Diffstat (limited to 'src')
-rw-r--r--src/bun.js/child_process.exports.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bun.js/child_process.exports.js b/src/bun.js/child_process.exports.js
index 7af8bdebd..71d97366a 100644
--- a/src/bun.js/child_process.exports.js
+++ b/src/bun.js/child_process.exports.js
@@ -290,7 +290,9 @@ export function execFile(file, args, options, callback) {
if (args?.length) cmd += ` ${ArrayPrototypeJoin.call(args, " ")}`;
if (!ex) {
- ex = genericNodeError(`Command failed: ${cmd}\n${stderr}`, {
+ let message = `Command failed: ${cmd}`;
+ if (stderr) message += `\n${stderr}`;
+ ex = genericNodeError(message, {
// code: code < 0 ? getSystemErrorName(code) : code, // TODO: Add getSystemErrorName
code: code,
killed: child.killed || killed,