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

This commit is contained in:
Sam Denty 2024-10-07 15:00:18 +01:00
parent efcb93d6d8
commit c192386805
No known key found for this signature in database
GPG Key ID: 7B4EAF7B9E291B79

View File

@ -128,7 +128,9 @@ export class ActionRunner {
const webcontainer = await this.#webcontainer; 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', () => { action.abortSignal.addEventListener('abort', () => {
process.kill(); process.kill();