From cbac505a12d0ca60fb1ce5fe2eb554a445e9b5c1 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Thu, 5 Feb 2015 15:19:53 -0800 Subject: [PATCH] Move the mobile check on Windows earlier: before the ip/port parsing --- tools/commands.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/commands.js b/tools/commands.js index 48171407cd..eea16e4f66 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -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 {