File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,12 @@ export function createPool(ctx: Vitest): WorkerPool {
33
33
34
34
const conditions = ctx . server . config . resolve . conditions ?. flatMap ( c => [ '--conditions' , c ] ) || [ ]
35
35
36
+ // Instead of passing whole process.execArgv to the workers, pick allowed options.
37
+ // Some options may crash worker, e.g. --prof, --title. nodejs/node#41103
38
+ const execArgv = process . execArgv . filter ( execArg =>
39
+ execArg . startsWith ( '--cpu-prof' ) || execArg . startsWith ( '--heap-prof' ) ,
40
+ )
41
+
36
42
const options : TinypoolOptions = {
37
43
filename : workerPath ,
38
44
// TODO: investigate further
@@ -44,13 +50,17 @@ export function createPool(ctx: Vitest): WorkerPool {
44
50
45
51
execArgv : ctx . config . deps . registerNodeLoader
46
52
? [
53
+ ...execArgv ,
47
54
'--require' ,
48
55
suppressLoaderWarningsPath ,
49
56
'--experimental-loader' ,
50
57
loaderPath ,
51
58
...conditions ,
52
59
]
53
- : conditions ,
60
+ : [
61
+ ...execArgv ,
62
+ ...conditions ,
63
+ ] ,
54
64
}
55
65
56
66
if ( ctx . config . isolate ) {
You can’t perform that action at this time.
0 commit comments