Skip to content

Commit d298e59

Browse files
committed
update specs and use shell for spawn process
1 parent fb50097 commit d298e59

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/helpers/packageInstaller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const packageInstall = (packageDir) => {
6666
logger.error(`Some error occurred while installing packages: ${util.inspect(error)}`);
6767
reject(`Packages were not installed successfully. Error Description ${util.inspect(error)}`);
6868
};
69-
nodeProcess = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ['install', '--loglevel', 'verbose', '>', '../npm_install_debug.log', '2>&1'], {cwd: packageDir});
69+
nodeProcess = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ['install', '--loglevel', 'verbose', '>', '../npm_install_debug.log', '2>&1'], {cwd: packageDir, shell: true});
7070
nodeProcess.on('close', nodeProcessCloseCallback);
7171
nodeProcess.on('error', nodeProcessErrorCallback);
7272
});

test/unit/bin/helpers/packageInstaller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ describe("packageInstaller", () => {
256256
})
257257
.catch((error) => {
258258
spawnStub.restore();
259-
chai.assert.equal(error, "Packages were not installed successfully.")
259+
chai.assert.equal(error, "Packages were not installed successfully. Error code 1")
260260
});
261261
});
262262
});

0 commit comments

Comments
 (0)