Skip to content

Commit 8075dad

Browse files
committed
fix(cli): keep task JSON resets off stdout
1 parent e8c70d1 commit 8075dad

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/commands/tasks.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ describe("tasks commands", () => {
811811
message: expect.stringContaining("Task not found: missing"),
812812
},
813813
});
814+
expect(jsonLookupRuntime.exit).toHaveBeenCalledWith(1, { resetStream: process.stderr });
814815
});
815816
});
816817

‎src/commands/tasks.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ export async function tasksShowCommand(
330330
} else {
331331
runtime.error(message);
332332
}
333-
runtime.exit(1);
333+
runtime.exit(1, opts.json ? { resetStream: process.stderr } : undefined);
334334
return;
335335
}
336336

0 commit comments

Comments
 (0)