Fix cn check workers exiting with code 1
Intercept --internal-check-worker flag before program.parse() so forked worker subprocesses route to runCheckWorker() instead of hitting the unknown command handler. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
46b04cad4e
commit
5534789dc0
1 changed files with 7 additions and 0 deletions
|
|
@ -444,6 +444,13 @@ program.on("command:*", () => {
|
|||
});
|
||||
|
||||
export async function runCli(): Promise<void> {
|
||||
// Handle internal worker subprocess for cn check
|
||||
if (process.argv.includes("--internal-check-worker")) {
|
||||
const { runCheckWorker } = await import("./commands/check/checkWorker.js");
|
||||
await runCheckWorker();
|
||||
return;
|
||||
}
|
||||
|
||||
// Parse arguments and handle errors
|
||||
try {
|
||||
program.parse();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue