Skip to content

Commit 79510d4

Browse files
committed
fix install command
1 parent 12cbfa0 commit 79510d4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/util/backend/npm-sanbox.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,16 @@ export async function runInSandbox(name: string, version: string): Promise<PkgSi
1414
const whoami = await sandbox.runCommand('whoami');
1515
console.log(`Running as: ${await whoami.stdout()}`);
1616

17-
const which = await sandbox.runCommand('which node');
18-
console.log(`which: ${await which.stdout()}`);
19-
2017
const pwd = await sandbox.runCommand('pwd');
2118
console.log(`Working dir: ${await pwd.stdout()}`);
2219

23-
const init = await sandbox.runCommand(`npm init -y`);
20+
const init = await sandbox.runCommand('npm', ['init', '-y']);
2421
console.log(`npm init: ${await init.stdout()}`);
2522

26-
const install = await sandbox.runCommand(`npm init -y && npm install ${name}@${version}`);
23+
const install = await sandbox.runCommand('npm', ['install', `${name}@${version}`]);
2724
console.log(`npm install: ${await install.stdout()}`);
2825

29-
const node_modules = await sandbox.runCommand('du -sh node_modules');
26+
const node_modules = await sandbox.runCommand('du', ['-sh', 'node_modules']);
3027
console.log(`node_modules: ${await node_modules.stdout()}`);
3128

3229
return {

0 commit comments

Comments
 (0)