Skip to content

Commit 5110fbd

Browse files
committed
fix issue when running opencode in empty directory
1 parent e6ddb47 commit 5110fbd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/opencode/src/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,13 @@ const cli = yargs(hideBin(process.argv))
127127
) {
128128
cli.showHelp("log")
129129
}
130-
Log.Default.error(msg, {
131-
err,
132-
})
133130
})
134131
.strict()
135132

136133
try {
137134
await cli.parse()
138135
} catch (e) {
139-
Log.Default.error(e)
136+
Log.Default.error(e, {
137+
stack: e instanceof Error ? e.stack : undefined,
138+
})
140139
}

0 commit comments

Comments
 (0)