CB-5803 Fix cordova/emulate on windows.

This commit is contained in:
Andrew Grieve 2014-01-16 13:19:39 -05:00
parent 22e4039133
commit ef9ace9e65

View File

@ -178,14 +178,8 @@ module.exports.start = function(emulator_ID) {
return Q(emulator_ID);
}
}).then(function() {
var cmd, args;
if(process.platform == 'win32' || process.platform == 'win64') {
cmd = '%comspec%';
args = ['/c', 'start', 'cmd', '/c', 'emulator', '-avd', emulator_ID];
} else {
cmd = 'emulator';
args = ['-avd', emulator_ID];
}
var cmd = 'emulator';
var args = ['-avd', emulator_ID];
var proc = child_process.spawn(cmd, args, { stdio: 'inherit', detached: true });
proc.unref(); // Don't wait for it to finish, since the emulator will probably keep running for a long time.
}).then(function() {