File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ import { fileURLToPath } from 'node:url'
99if ( nodeModule . enableCompileCache && ! process . env . NODE_DISABLE_COMPILE_CACHE ) {
1010 try {
1111 const { directory } = nodeModule . enableCompileCache ( )
12- // allow child process to share the same cache directory
13- process . env . NODE_COMPILE_CACHE ||= directory
12+ if ( directory ) {
13+ // allow child process to share the same cache directory
14+ process . env . NODE_COMPILE_CACHE ||= directory
15+ }
1416 }
1517 catch {
1618 // Ignore errors
Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ import { fileURLToPath } from 'node:url'
99if ( nodeModule . enableCompileCache && ! process . env . NODE_DISABLE_COMPILE_CACHE ) {
1010 try {
1111 const { directory } = nodeModule . enableCompileCache ( )
12- // allow child process to share the same cache directory
13- process . env . NODE_COMPILE_CACHE ||= directory
12+ if ( directory ) {
13+ // allow child process to share the same cache directory
14+ process . env . NODE_COMPILE_CACHE ||= directory
15+ }
1416 }
1517 catch {
1618 // Ignore errors
You can’t perform that action at this time.
0 commit comments