Skip to content

Commit 0bfd397

Browse files
committed
fix(fmt): preserve configured compile cache root
1 parent 1b4fc8b commit 0bfd397

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/rstack/bin/rs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import nodeModule from 'node:module';
33

44
// enable on-disk code caching and share its directory with child workers
55
// requires Nodejs >= 22.8.0
6-
const { enableCompileCache } = nodeModule;
6+
const { enableCompileCache, constants } = nodeModule;
77
if (enableCompileCache) {
88
try {
9-
const { directory } = enableCompileCache();
10-
if (directory) {
9+
const { directory, status } = enableCompileCache();
10+
if (directory && status === constants.compileCacheStatus.ENABLED) {
1111
process.env.NODE_COMPILE_CACHE = directory;
1212
}
1313
} catch {

0 commit comments

Comments
 (0)