fix(tsgo): skip heavy-check lock for metadata commands

This commit is contained in:
Vincent Koc
2026-04-12 05:35:22 +01:00
parent cded4fc5db
commit d62279a9b2
3 changed files with 42 additions and 5 deletions

View File

@@ -114,6 +114,17 @@ export function shouldAcquireLocalHeavyCheckLockForOxlint(
});
}
export function shouldAcquireLocalHeavyCheckLockForTsgo(args, env = process.env) {
if (env.OPENCLAW_TSGO_FORCE_LOCK === "1") {
return true;
}
return !args.some(
(arg) =>
arg === "--help" || arg === "-h" || arg === "--version" || arg === "-v" || arg === "--init",
);
}
export function shouldThrottleLocalHeavyChecks(env, hostResources) {
if (!isLocalCheckEnabled(env)) {
return false;