mirror of
https://github.com/openclaw/openclaw.git
synced 2026-09-11 02:47:17 +00:00
* fix(tooling): avoid shared tsx cache startup stalls Use the shared preloader before tsx initializes so maintained build, check, and test commands retain memory transforms without scanning other checkouts' disk caches. Preserve changed-cwd forks and copied tooling closures. * test: align command contracts with tooling bootstrap
14 lines
566 B
JavaScript
14 lines
566 B
JavaScript
import { registerToolingTsx } from "./lib/tsx-cli-shim.mjs";
|
|
|
|
// fork() inherits execArgv but can change cwd. Keep our root-script preload
|
|
// resolvable there without rewriting unrelated flags or other preloads.
|
|
const preload = "./scripts/tsx.mjs";
|
|
for (const [index, arg] of process.execArgv.entries()) {
|
|
if (arg === preload && process.execArgv[index - 1] === "--import") {
|
|
process.execArgv[index] = import.meta.url;
|
|
} else if (arg === `--import=${preload}`) {
|
|
process.execArgv[index] = `--import=${import.meta.url}`;
|
|
}
|
|
}
|
|
|
|
await registerToolingTsx();
|