deno
a72c4132 - fix(ext/node): forward permissions when spawning deno with subcommand args (#35443)

Commit
142 days ago
fix(ext/node): forward permissions when spawning deno with subcommand args (#35443) When an npm tool running under Deno spawns a child process that is itself Deno, the node-compat layer translates the Node.js argv to Deno argv and grants the child full permissions (-A) so it behaves like a permissionless Node.js process. That injection was skipped whenever the spawned argv already started with a Deno subcommand: a tool that detected it was running under Deno and spawned something like "deno run <script>" had its args passed through verbatim, dropping the implicit -A. The child then ran with no permissions and tripped a permission prompt on the first env read (TERM), which hung because the parent CLI holds stdin in raw mode and the prompt could never be answered. This restores Node.js semantics in that pass-through path: when the subcommand executes user code (run/test/bench/serve) and no explicit permission flag is present, -A is injected. Callers that pass their own permission flags (for example vitest workers that spawn "run -A ...") are left untouched, and detection covers long, short, bundled and =value forms to mirror the CLI parser. Fixes #35441
Author
Parents
Loading