Browse Source

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

Haris Gušić 4 months ago
parent
commit
c5b5795636
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/opencode/src/cli/cmd/export.ts

+ 2 - 1
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) {
       } catch (error) {
         UI.error(`Session not found: ${sessionID!}`)
         UI.error(`Session not found: ${sessionID!}`)
         process.exit(1)
         process.exit(1)