Skip to content

Commit 3625766

Browse files
authored
tweak: ensure run command doesn't send request if no prompt present (anomalyco#2332)
1 parent 924e84b commit 3625766

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • packages/opencode/src/cli/cmd

packages/opencode/src/cli/cmd/run.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ export const RunCommand = cmd({
6464

6565
if (!process.stdin.isTTY) message += "\n" + (await Bun.stdin.text())
6666

67+
if (message.trim().length === 0) {
68+
UI.error("Message cannot be empty")
69+
return
70+
}
71+
6772
await bootstrap({ cwd: process.cwd() }, async () => {
6873
const session = await (async () => {
6974
if (args.continue) {

0 commit comments

Comments
 (0)