mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
core: improve error handling with console output for debugging
This commit is contained in:
parent
731122bf99
commit
7a20f77ebf
2 changed files with 5 additions and 1 deletions
|
|
@ -40,6 +40,7 @@ for (const [os, arch] of targets) {
|
|||
await $`tar -xf ../../node_modules/${watcher.replace("@parcel/", "parcel-")}-*.tgz -C ../../node_modules/${watcher} --strip-components=1`
|
||||
|
||||
await Bun.build({
|
||||
sourcemap: true,
|
||||
compile: {
|
||||
target: `bun-${os}-${arch}` as any,
|
||||
outfile: `dist/${name}/bin/opencode`,
|
||||
|
|
|
|||
|
|
@ -129,7 +129,10 @@ try {
|
|||
Log.Default.error("fatal", data)
|
||||
const formatted = FormatError(e)
|
||||
if (formatted) UI.error(formatted)
|
||||
if (formatted === undefined) UI.error("Unexpected error, check log file at " + Log.file() + " for more details")
|
||||
if (formatted === undefined) {
|
||||
UI.error("Unexpected error, check log file at " + Log.file() + " for more details\n")
|
||||
console.error(e)
|
||||
}
|
||||
process.exitCode = 1
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue