Fix install for Windows (#138)
Summary: This lets `yarn` work properly on Windows. Tested in a Cygwin environment. I also added a note about yarn compatibility to the readme. Closes https://github.com/facebook/Sonar/pull/138 Reviewed By: danielbuechele Differential Revision: D8734197 Pulled By: xiphirx fbshipit-source-id: 19be8bb0653a2b0381224b065df0cac579d72c3b
This commit is contained in:
committed by
Facebook Github Bot
parent
49c533ed35
commit
2a46f93eab
@@ -9,8 +9,9 @@ const glob = require('glob');
|
||||
const path = require('path');
|
||||
const {spawn} = require('child_process');
|
||||
const PACKAGES = ['static', 'src/plugins/*', 'src/fb/plugins/*'];
|
||||
const WINDOWS = /^win/.test(process.platform);
|
||||
const YARN_PATH =
|
||||
process.argv.length > 2 ? path.join(__dirname, process.argv[2]) : 'yarn';
|
||||
process.argv.length > 2 ? path.join(__dirname, process.argv[2]) : 'yarn' + (WINDOWS ? '.cmd' : '');
|
||||
|
||||
Promise.all(
|
||||
PACKAGES.map(
|
||||
|
||||
Reference in New Issue
Block a user