From 3526b9bde2a427d6d0c0b8ed6666d2d43b508e27 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 28 Sep 2026 11:36:05 +0800 Subject: [PATCH] fix(cli): skip Node compile cache in CI --- packages/rstack/bin/rs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/rstack/bin/rs.js b/packages/rstack/bin/rs.js index 2dd9fc9f..b02f44ae 100755 --- a/packages/rstack/bin/rs.js +++ b/packages/rstack/bin/rs.js @@ -4,7 +4,9 @@ import nodeModule from 'node:module'; // enable on-disk code caching and share its directory with child workers // requires Nodejs >= 22.8.0 const { enableCompileCache, constants } = nodeModule; -if (enableCompileCache) { +const isCI = Boolean(process.env.CI) && process.env.CI !== 'false'; +// Skip CI, where the cache is unlikely to be reused. +if (enableCompileCache && !isCI) { try { const { directory, status } = enableCompileCache(); // ALREADY_ENABLED returns the active version-specific cache directory.