fix(npm): fix hanging shells (#159)

This commit is contained in:
Sam Denty 2024-10-07 16:24:29 +02:00 committed by GitHub
parent d0828e4c86
commit 31c07c06cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -128,7 +128,9 @@ export class ActionRunner {
const webcontainer = await this.#webcontainer;
const process = await webcontainer.spawn('jsh', ['-c', action.content]);
const process = await webcontainer.spawn('jsh', ['-c', action.content], {
env: { npm_config_yes: true },
});
action.abortSignal.addEventListener('abort', () => {
process.kill();

View File

@ -11,7 +11,6 @@ export async function newShellProcess(webcontainer: WebContainer, terminal: ITer
cols: terminal.cols ?? 80,
rows: terminal.rows ?? 15,
},
env: { npm_config_yes: true },
});
const input = process.input.getWriter();