mirror of
https://github.com/morluto/rea
synced 2026-10-25 22:08:11 -04:00
fix(cli): consume canonical output validation state
This commit is contained in:
@@ -116,11 +116,7 @@ export const createCliResultOutput = (
|
||||
destination: Writable,
|
||||
): CliResultOutput | undefined => {
|
||||
let options = initialOptions;
|
||||
if (
|
||||
(options.parseError && options.format !== "jsonl") ||
|
||||
!options.validation.ok
|
||||
)
|
||||
return undefined;
|
||||
if (!options.validation.ok) return undefined;
|
||||
let format = options.format as "json" | "jsonl" | "yaml" | "toon" | "md";
|
||||
let handled = false;
|
||||
let failed = false;
|
||||
|
||||
@@ -65,6 +65,8 @@ describe("SDK output completion", () => {
|
||||
parseCliOutputArguments(["--format", format]),
|
||||
destination,
|
||||
);
|
||||
if (output === undefined)
|
||||
throw new Error("Expected valid output controls");
|
||||
expect(output.captureSdkOutput(document)).toBe(false);
|
||||
destination.write(document);
|
||||
expect(complete).toBe(false);
|
||||
|
||||
Reference in New Issue
Block a user