fix: bound agentrun restart dry-run output
Pipelines as Code CI / hwlab-web-probe-sentinel-nc01- Success
Pipelines as Code CI / hwlab-web-probe-sentinel-nc01- Success
This commit is contained in:
@@ -80,9 +80,20 @@ export function parseLaneConfirmOptions(args: string[]): LaneConfirmOptions {
|
||||
const base = parseConfirmOptions(args);
|
||||
let node: string | null = null;
|
||||
let lane: string | null = null;
|
||||
let full = false;
|
||||
let raw = false;
|
||||
for (let index = 0; index < args.length; index += 1) {
|
||||
const arg = args[index];
|
||||
if (arg === "--confirm" || arg === "--dry-run") continue;
|
||||
if (arg === "--full") {
|
||||
full = true;
|
||||
continue;
|
||||
}
|
||||
if (arg === "--raw") {
|
||||
raw = true;
|
||||
full = true;
|
||||
continue;
|
||||
}
|
||||
if (arg === "--node") {
|
||||
const value = args[index + 1];
|
||||
if (value === undefined || value.startsWith("--")) throw new Error("--node requires a value");
|
||||
@@ -100,7 +111,7 @@ export function parseLaneConfirmOptions(args: string[]): LaneConfirmOptions {
|
||||
throw new Error(`unsupported control-plane option: ${arg}`);
|
||||
}
|
||||
if (node === null && lane === null) throw new Error("control-plane apply requires --node and --lane");
|
||||
return { ...base, node, lane };
|
||||
return { ...base, node, lane, full, raw };
|
||||
}
|
||||
|
||||
export function parseRefreshOptions(args: string[]): RefreshOptions {
|
||||
|
||||
Reference in New Issue
Block a user