From 55f8f3e37010b08dd58878f79d7206d373e793ee Mon Sep 17 00:00:00 2001 From: Martin Konicek Date: Thu, 22 Oct 2015 07:08:51 -0700 Subject: [PATCH] Explanatory message when starting packager on Windows or unknown platform Reviewed By: martinbigio Differential Revision: D2564756 fb-gh-sync-id: 097ec541267a54a45d82116a03e4c22b8f49eb99 --- private-cli/src/runAndroid/runAndroid.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/private-cli/src/runAndroid/runAndroid.js b/private-cli/src/runAndroid/runAndroid.js index e203f197b..acee9e85a 100644 --- a/private-cli/src/runAndroid/runAndroid.js +++ b/private-cli/src/runAndroid/runAndroid.js @@ -132,13 +132,17 @@ function startServerInNewWindow() { ['-e', 'sh', launchPackagerScript], {detached: true} ); + } else if (/^win/.test(process.platform)) { + console.log(chalk.yellow('Starting the packager in a new window ' + + 'is not supported on Windows yet.\nPlease start it manually using ' + + '\'react-native start\'.')); + console.log('We believe the best Windows ' + + 'support will come from a community of people\nusing React Native on ' + + 'Windows on a daily basis.\n' + + 'Would you be up for sending a pull request?'); } else { - console.error(chalk.yellow( - 'Starting packager in new window is not supported on Windows yet. ' + - 'See https://github.com/facebook/react-native/issues/3469 on how to ' + - 'start it manually.' - )); - throw new Error('Windows is not yet supported'); + console.log(chalk.red('Cannot start the packager. Unknown platform ' + + process.platform)); } }