Always install node binaries except on Windows (#790)

This commit is contained in:
Kristian Dupont 2017-01-11 11:12:43 +01:00 committed by GitHub
parent f9f61aeb36
commit 2187667650

View File

@ -13,16 +13,17 @@ try {
// Not a React Native install. Must be either Node or Electron.
var isNode = !isReactNative;
if (isNode) {
if (process.platform === 'win32') {
console.error('ERROR: Realm is not yet supported on Windows');
if (isNode) {
console.error('ERROR: Realm is not yet supported for Node on Windows');
process.exit(-1);
} else {
console.warn('NOTE: Realm is not supported for Node on Windows, so you will not be able to run unit tests that rely on Realm with a node-based runner.');
}
} else {
// Execute "node-pre-gyp install --fallback-to-build
var pregyp = spawn('node-pre-gyp', ['install', '--fallback-to-build']);
pregyp.stdout.on('data', function (data) { console.log(data.toString()); });
pregyp.stderr.on('data', function (data) { console.error(data.toString()); });
pregyp.on('exit', function (code) { process.exit(code); });
}