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
@@ -50,6 +50,8 @@ yarn
|
|||||||
yarn start
|
yarn start
|
||||||
```
|
```
|
||||||
|
|
||||||
|
NOTE: If you're on Windows, you need to use Yarn 1.5.1 until [this issue](https://github.com/yarnpkg/yarn/issues/6048) is resolved.
|
||||||
|
|
||||||
## Building the desktop app
|
## Building the desktop app
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -9,8 +9,9 @@ const glob = require('glob');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const {spawn} = require('child_process');
|
const {spawn} = require('child_process');
|
||||||
const PACKAGES = ['static', 'src/plugins/*', 'src/fb/plugins/*'];
|
const PACKAGES = ['static', 'src/plugins/*', 'src/fb/plugins/*'];
|
||||||
|
const WINDOWS = /^win/.test(process.platform);
|
||||||
const YARN_PATH =
|
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(
|
Promise.all(
|
||||||
PACKAGES.map(
|
PACKAGES.map(
|
||||||
|
|||||||
Reference in New Issue
Block a user