Skip to content

The open source coding agent.

TypeScript

fix: process.stdout.write instead of console.log for export cmd (#3049)

Haris Gušićc5b5795636c1
diff --git a/packages/opencode/src/cli/cmd/export.ts b/packages/opencode/src/cli/cmd/export.ts
index 996522b5a30..c8825c83d29 100644
--- a/packages/opencode/src/cli/cmd/export.ts
+++ b/packages/opencode/src/cli/cmd/export.ts
@@ -66,7 +66,8 @@ export const ExportCommand = cmd({
})),
}
- console.log(JSON.stringify(exportData, null, 2))
+ process.stdout.write(JSON.stringify(exportData, null, 2))
+ process.stdout.write("\n")
} catch (error) {
UI.error(`Session not found: ${sessionID!}`)
process.exit(1)