mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-05 08:13:06 +08:00
The PATH lookup for spawns with an `env` option picked the first executable regular file and stopped there, so a script whose interpreter is missing ended the search with ENOENT. Node's libuv runs execvp in the child, which moves on to the next PATH entry when an exec fails with ENOENT, ENOTDIR or EACCES. Each candidate now runs through posix_spawn in order with the same rule, and relative entries are resolved by the child in its cwd.