This repository was archived by the owner on Dec 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 37
37
"dependencies" : {
38
38
"cacache" : " ^11.3.2" ,
39
39
"find-cache-dir" : " ^2.1.0" ,
40
+ "is-wsl" : " ^1.1.0" ,
40
41
"schema-utils" : " ^1.0.0" ,
41
42
"serialize-javascript" : " ^1.7.0" ,
42
43
"source-map" : " ^0.6.1" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import cacache from 'cacache';
4
4
import findCacheDir from 'find-cache-dir' ;
5
5
import workerFarm from 'worker-farm' ;
6
6
import serialize from 'serialize-javascript' ;
7
+ import isWsl from 'is-wsl' ;
7
8
8
9
import minify from './minify' ;
9
10
@@ -19,10 +20,11 @@ export default class TaskRunner {
19
20
// In some cases cpus() returns undefined
20
21
// https://github.com/nodejs/node/issues/19022
21
22
const cpus = os . cpus ( ) || { length : 1 } ;
22
- this . maxConcurrentWorkers =
23
- parallel === true
24
- ? cpus . length - 1
25
- : Math . min ( Number ( parallel ) || 0 , cpus . length - 1 ) ;
23
+ this . maxConcurrentWorkers = isWsl
24
+ ? 1
25
+ : parallel === true
26
+ ? cpus . length - 1
27
+ : Math . min ( Number ( parallel ) || 0 , cpus . length - 1 ) ;
26
28
}
27
29
28
30
run ( tasks , callback ) {
You can’t perform that action at this time.
0 commit comments