fix(cli): handle negated schedule limit flags (#5973)

This commit is contained in:
Yu Han
2026-10-03 17:53:11 +02:00
committed by GitHub
parent 526ad1366f
commit 15d8ba16a0
2 changed files with 102 additions and 9 deletions
+6 -8
View File
@@ -23,10 +23,8 @@ export interface ScheduleUpdateOptions extends ScheduleCommandOptions {
model?: string;
mode?: string;
cwd?: string;
maxRuns?: string;
noMaxRuns?: boolean;
expiresIn?: string;
noExpiresIn?: boolean;
maxRuns?: string | false;
expiresIn?: string | false;
}
export async function runUpdateCommand(
@@ -45,10 +43,10 @@ export async function runUpdateCommand(
model: options.model,
mode: options.mode,
cwd: options.cwd,
maxRuns: options.maxRuns,
expiresIn: options.expiresIn,
clearMaxRuns: options.noMaxRuns,
clearExpires: options.noExpiresIn,
maxRuns: options.maxRuns === false ? undefined : options.maxRuns,
expiresIn: options.expiresIn === false ? undefined : options.expiresIn,
clearMaxRuns: options.maxRuns === false,
clearExpires: options.expiresIn === false,
});
const { client } = await connectScheduleClient(options.daemonTarget);
try {