Move the mobile check on Windows earlier: before the ip/port parsing

This commit is contained in:
Slava Kim
2015-02-05 15:19:53 -08:00
parent 91667d927f
commit cbac505a12

View File

@@ -242,6 +242,14 @@ function doRunCommand (options) {
return 1;
}
options.args = dontBuildMobileOnWindows(options.args, {
exit: true,
messageFunc: function (platforms) {
return "Can't run on the following platforms on Windows: " +
platforms.join(", ");
}
});
try {
var parsedMobileServer = utils.mobileServerForRun(options);
} catch (err) {
@@ -280,14 +288,6 @@ function doRunCommand (options) {
// XXX We should defer this work until after the proxy is listening!
// eg, move it into a CordovaBuildRunner or something.
options.args = dontBuildMobileOnWindows(options.args, {
exit: true,
messageFunc: function (platforms) {
return "Can't run on the following platforms on Windows: " +
platforms.join(", ");
}
});
if (options.args.length) {
// will asynchronously start mobile emulators/devices
try {