You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unknown error in execFileSync from node:child_process #31710
✅ Reproduced — an executable with no shebang makes execve return ENOEXEC; Node/libuv transparently retry the exec through the shell, Bun surfaced the raw error.
Fix in #31717: on ENOEXEC, re-exec sh <file> <args...> (matching libuv/Node — $0 is the resolved path, $1.. the user args). Covers execFileSync, spawnSync, execFile, Bun.spawn/Bun.spawnSync, and Bun Shell (also fixes #11563).
#11563 is the same underlying bug: running an executable script with no shebang makes execve fail with ENOEXEC, and Bun surfaces that instead of retrying through /bin/sh the way Node does (Bun Shell shows it as "Exec format error"). The fix in progress covers spawn/spawnSync/execFileSync as well, so closing this as a duplicate; please follow #11563. Adding #!/bin/sh to the script works around it today.
Activity
robobun commentedon Jun 2, 2026
✅ Reproduced — an executable with no shebang makes
execvereturnENOEXEC; Node/libuv transparently retry the exec through the shell, Bun surfaced the raw error.Fix in #31717: on
ENOEXEC, re-execsh <file> <args...>(matching libuv/Node —$0is the resolved path,$1..the user args). CoversexecFileSync,spawnSync,execFile,Bun.spawn/Bun.spawnSync, and Bun Shell (also fixes #11563).github-actions commentedon Jun 2, 2026
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
spawn: retry via /bin/sh when exec returns ENOEXEC
spawn: retry via /bin/sh when exec returns ENOEXEC
Jarred-Sumner commentedon Aug 13, 2026
#11563 is the same underlying bug: running an executable script with no shebang makes execve fail with ENOEXEC, and Bun surfaces that instead of retrying through
/bin/shthe way Node does (Bun Shell shows it as "Exec format error"). The fix in progress covers spawn/spawnSync/execFileSync as well, so closing this as a duplicate; please follow #11563. Adding#!/bin/shto the script works around it today.Duplicate of #11563
Please add a 👍 or any extra details over there so it all stays in one place. If this is actually a different problem, say so here and we'll reopen.
(This comment was written by Claude, on behalf of the Bun team.)