tweak: ensure run command doesn't send request if no prompt present (#2332)
This commit is contained in:
@@ -64,6 +64,11 @@ export const RunCommand = cmd({
|
|||||||
|
|
||||||
if (!process.stdin.isTTY) message += "\n" + (await Bun.stdin.text())
|
if (!process.stdin.isTTY) message += "\n" + (await Bun.stdin.text())
|
||||||
|
|
||||||
|
if (message.trim().length === 0) {
|
||||||
|
UI.error("Message cannot be empty")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
await bootstrap({ cwd: process.cwd() }, async () => {
|
await bootstrap({ cwd: process.cwd() }, async () => {
|
||||||
const session = await (async () => {
|
const session = await (async () => {
|
||||||
if (args.continue) {
|
if (args.continue) {
|
||||||
|
|||||||
Reference in New Issue
Block a user