Skip to content

Commit 1534d17

Browse files
authored
fix(cli): skip Node compile cache in CI (#525)
1 parent 0a83a78 commit 1534d17

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/rstack/bin/rs.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import nodeModule from 'node:module';
44
// enable on-disk code caching and share its directory with child workers
55
// requires Nodejs >= 22.8.0
66
const { enableCompileCache, constants } = nodeModule;
7-
if (enableCompileCache) {
7+
const isCI = Boolean(process.env.CI) && process.env.CI !== 'false';
8+
// Skip CI, where the cache is unlikely to be reused.
9+
if (enableCompileCache && !isCI) {
810
try {
911
const { directory, status } = enableCompileCache();
1012
// ALREADY_ENABLED returns the active version-specific cache directory.

0 commit comments

Comments
 (0)