Skip to content

Commit

Permalink
fix(npm): fix hanging shells (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
samdenty authored Oct 7, 2024
1 parent d0828e4 commit 31c07c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/lib/runtime/action-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion app/utils/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 31c07c0

Please sign in to comment.