fix cli output dumping and otel web-probe diagnostics

This commit is contained in:
Codex
2026-06-21 16:46:17 +00:00
parent da3efa4c6e
commit 06bffaf74a
9 changed files with 959 additions and 76 deletions
+10
View File
@@ -290,6 +290,11 @@ async function main(): Promise<void> {
if (top === "gh") {
const result = await runGhCommand(args.slice(1));
const ok = (result as { ok?: unknown }).ok !== false;
if (isRenderedCliResult(result)) {
emitText(result.renderedText);
if (!ok) process.exitCode = 1;
return;
}
emitJson(commandName, result, ok);
if (!ok) process.exitCode = 1;
return;
@@ -316,6 +321,11 @@ async function main(): Promise<void> {
const { runHwlabNodeCommand } = await import("./src/hwlab-node");
const result = await runHwlabNodeCommand(readConfig(), args.slice(2));
const ok = (result as { ok?: unknown }).ok !== false;
if (isRenderedCliResult(result)) {
emitText(result.renderedText);
if (!ok) process.exitCode = 1;
return;
}
emitJson(commandName, result, ok);
if (!ok) process.exitCode = 1;
return;