mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 13:22:14 +00:00
32 lines
719 B
JavaScript
32 lines
719 B
JavaScript
import { spawnSync } from "node:child_process";
|
|
import path from "node:path";
|
|
import {
|
|
acquireLocalHeavyCheckLockSync,
|
|
applyLocalOxlintPolicy,
|
|
} from "./lib/local-heavy-check-runtime.mjs";
|
|
|
|
const { args: finalArgs, env } = applyLocalOxlintPolicy(process.argv.slice(2), process.env);
|
|
|
|
const oxlintPath = path.resolve("node_modules", ".bin", "oxlint");
|
|
const releaseLock = acquireLocalHeavyCheckLockSync({
|
|
cwd: process.cwd(),
|
|
env,
|
|
toolName: "oxlint",
|
|
});
|
|
|
|
try {
|
|
const result = spawnSync(oxlintPath, finalArgs, {
|
|
stdio: "inherit",
|
|
env,
|
|
shell: process.platform === "win32",
|
|
});
|
|
|
|
if (result.error) {
|
|
throw result.error;
|
|
}
|
|
|
|
process.exit(result.status ?? 1);
|
|
} finally {
|
|
releaseLock();
|
|
}
|