Try to fix Windows CI
Dan committed
May 18, 2018 at 09:25 UTC
96992f2a6ce6174e5f4dcf1572ee519950da485c
1 file changed
+5
-2
scripts/flow/runFlow.js
+5
-2
@@ -2,7 +2,6 @@
2
3
const chalk = require('chalk');
4
const spawn = require('child_process').spawn;
5
-const extension = process.platform === 'win32' ? '.cmd' : '';
5
6
require('./createFlowConfigs');
7
@@ -11,7 +10,11 @@ async function runFlow(renderer, args) {
10
console.log(
11
'Running Flow for the ' + chalk.cyan(renderer) + ' renderer...',
12
);
14
- spawn('../../../node_modules/.bin/flow' + extension, args, {
13
+ let cmd = '../../../node_modules/.bin/flow';
14
+ if (process.platform === 'win32') {
15
+ cmd = cmd.replace(/\//g, '\\') + '.cmd';
16
+ }
17
+ spawn(cmd, args, {
18
// Allow colors to pass through:
19
stdio: 'inherit',
20
// Use a specific renderer config: