fix(engine): disable Corepack download prompt in verification spawns
Non-TTY children spawned by the verification runner hung until the hard timeout when Corepack prompted before fetching a pinned packageManager version. Set COREPACK_ENABLE_DOWNLOAD_PROMPT=0 in the spawn env so the fetch proceeds (or fails fast) without waiting on stdin. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
5
.changeset/verification-corepack-prompt.md
Normal file
5
.changeset/verification-corepack-prompt.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@runfusion/fusion": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Disable Corepack's interactive download prompt when spawning verification commands so non-TTY children no longer hang until the hard timeout when a repo pins `packageManager` to a version Corepack hasn't cached yet.
|
||||||
@@ -184,7 +184,13 @@ export async function runVerificationCommand(
|
|||||||
const child = spawn(command, {
|
const child = spawn(command, {
|
||||||
cwd,
|
cwd,
|
||||||
stdio: ["ignore", "pipe", "pipe"],
|
stdio: ["ignore", "pipe", "pipe"],
|
||||||
env: { ...process.env },
|
env: {
|
||||||
|
...process.env,
|
||||||
|
// Corepack otherwise prompts interactively before fetching a pinned
|
||||||
|
// packageManager version, which hangs the non-TTY child until the
|
||||||
|
// hard timeout. Disable the prompt so it proceeds (or errors fast).
|
||||||
|
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0",
|
||||||
|
},
|
||||||
shell: true,
|
shell: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,13 @@ export async function execWithProcessGroup(
|
|||||||
shell: true,
|
shell: true,
|
||||||
detached: useProcessGroup,
|
detached: useProcessGroup,
|
||||||
stdio: ["ignore", "pipe", "pipe"],
|
stdio: ["ignore", "pipe", "pipe"],
|
||||||
...(options.env !== undefined && { env: { ...process.env, ...options.env } }),
|
env: {
|
||||||
|
...process.env,
|
||||||
|
// Corepack otherwise prompts interactively before fetching a pinned
|
||||||
|
// packageManager version, hanging the non-TTY child until timeout.
|
||||||
|
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0",
|
||||||
|
...(options.env ?? {}),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
let stdout = "";
|
let stdout = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user