fix: opencode run shouldn't print to stderr (#3341)

This commit is contained in:
Haris Gušić
2025-10-22 02:53:09 +02:00
committed by GitHub
parent 354f5c3281
commit 97c7e941eb
5 changed files with 17 additions and 23 deletions

View File

@@ -1,3 +1,4 @@
import { EOL } from "os"
import { File } from "../../../file"
import { bootstrap } from "../../bootstrap"
import { cmd } from "../cmd"
@@ -13,7 +14,7 @@ const FileSearchCommand = cmd({
async handler(args) {
await bootstrap(process.cwd(), async () => {
const results = await File.search({ query: args.query })
console.log(results.join("\n"))
console.log(results.join(EOL))
})
},
})

View File

@@ -1,3 +1,4 @@
import { EOL } from "os"
import { Ripgrep } from "../../../file/ripgrep"
import { Instance } from "../../../project/instance"
import { bootstrap } from "../../bootstrap"
@@ -48,7 +49,7 @@ const FilesCommand = cmd({
files.push(file)
if (args.limit && files.length >= args.limit) break
}
console.log(files.join("\n"))
console.log(files.join(EOL))
})
},
})