Skip to content

Commit

Permalink
properly spawning npm under windows
Browse files Browse the repository at this point in the history
  • Loading branch information
arboleya committed Dec 14, 2015
1 parent 8eb70f0 commit fc1538d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ App.prototype.ensure_deps = function(done) {

this.log.info('ensuring electrify dependencies');

var npm_cmd = 'npm' + (this.$.env.is.is_windows ? '.cmd' : '');

// in development mode, use local electrify version
if(this.$.env.is_development_mode) {

Expand All @@ -166,7 +168,7 @@ App.prototype.ensure_deps = function(done) {
}

// proceeds and self install itself :P
spawn('npm', ['i', '--save', join(__dirname, '..')], {
spawn(npm_cmd, ['i', '--save', join(__dirname, '..')], {
cwd: this.$.env.app.root,
stdio: this.$.env.stdio
}).on('exit', done);
Expand All @@ -187,7 +189,7 @@ App.prototype.ensure_deps = function(done) {
].join(' '));
}

spawn('npm', ['i'], {
spawn(npm_cmd, ['i'], {
cwd: this.$.env.app.root,
stdio: this.$.env.stdio
}).on('exit', done);
Expand Down

0 comments on commit fc1538d

Please sign in to comment.