Skip to content

Commit a6a2df6

Browse files
committed
windows pm2 install fix
1 parent 7c1f969 commit a6a2df6

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lib/API/Modules/LOCAL.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ function installLangModule(module_name, cb) {
106106
var install_instance = spawn(cst.IS_WINDOWS ? 'npm.cmd' : 'npm', ['install', module_name, '--loglevel=error'], {
107107
stdio : 'inherit',
108108
env: process.env,
109-
cwd : node_module_path
109+
cwd : node_module_path,
110+
shell : cst.IS_WINDOWS
110111
});
111112

112113
install_instance.on('close', function(code) {

lib/API/Modules/NPM.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ function getNPMCommandLine(module_name, install_path) {
190190
return spawn.bind(this, cst.IS_WINDOWS ? 'npm.cmd' : 'npm', ['install', module_name, '--loglevel=error', '--prefix', install_path], {
191191
stdio : 'inherit',
192192
env: process.env,
193-
windowsHide: true
193+
windowsHide: true,
194+
shell : cst.IS_WINDOWS
194195
})
195196
}
196197
else {

0 commit comments

Comments
 (0)