Sam Denty
commited on
fix(npm): fix hanging shells (#159)
Browse files- app/lib/runtime/action-runner.ts +3 -1
- app/utils/shell.ts +0 -1
app/lib/runtime/action-runner.ts
CHANGED
@@ -128,7 +128,9 @@ export class ActionRunner {
|
|
128 |
|
129 |
const webcontainer = await this.#webcontainer;
|
130 |
|
131 |
-
const process = await webcontainer.spawn('jsh', ['-c', action.content]
|
|
|
|
|
132 |
|
133 |
action.abortSignal.addEventListener('abort', () => {
|
134 |
process.kill();
|
|
|
128 |
|
129 |
const webcontainer = await this.#webcontainer;
|
130 |
|
131 |
+
const process = await webcontainer.spawn('jsh', ['-c', action.content], {
|
132 |
+
env: { npm_config_yes: true },
|
133 |
+
});
|
134 |
|
135 |
action.abortSignal.addEventListener('abort', () => {
|
136 |
process.kill();
|
app/utils/shell.ts
CHANGED
@@ -11,7 +11,6 @@ export async function newShellProcess(webcontainer: WebContainer, terminal: ITer
|
|
11 |
cols: terminal.cols ?? 80,
|
12 |
rows: terminal.rows ?? 15,
|
13 |
},
|
14 |
-
env: { npm_config_yes: true },
|
15 |
});
|
16 |
|
17 |
const input = process.input.getWriter();
|
|
|
11 |
cols: terminal.cols ?? 80,
|
12 |
rows: terminal.rows ?? 15,
|
13 |
},
|
|
|
14 |
});
|
15 |
|
16 |
const input = process.input.getWriter();
|