Skip to content

Commit a7ae5d6

Browse files
committed
plugins: Fix stalling when installing of dependencies on node 16
1 parent 9e92037 commit a7ae5d6

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

plugins/headlamp-plugin/bin/headlamp-plugin.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,16 @@ function create(name) {
5858
// const proc1 = child_process.spawnSync('npm', ['link', '@kinvolk/headlamp-plugin'], {cwd: dstFolder});
5959

6060
// Run npm install.
61-
const proc = child_process.spawnSync('npm', ['install'], {cwd: dstFolder});
62-
process.stdout.write(proc.stdout);
63-
process.stderr.write(proc.stderr);
64-
if (proc.status !== 0) {
61+
try {
62+
child_process.execSync(
63+
'npm install --no-progress --verbose --loglevel silly',
64+
{
65+
stdio: 'inherit',
66+
cwd: dstFolder,
67+
encoding : 'utf8',
68+
}
69+
);
70+
} catch (e) {
6571
console.error(`Problem running npm install inside of "${dstFolder}"`);
6672
return 3;
6773
}

0 commit comments

Comments
 (0)