|
|
@@ -71,7 +71,7 @@ export const RunCommand = cmd({
|
|
|
|
|
|
if (message.trim().length === 0 && !args.command) {
|
|
|
UI.error("You must provide a message or a command")
|
|
|
- return
|
|
|
+ process.exit(1)
|
|
|
}
|
|
|
|
|
|
await bootstrap(process.cwd(), async () => {
|
|
|
@@ -79,7 +79,7 @@ export const RunCommand = cmd({
|
|
|
const exists = await Command.get(args.command)
|
|
|
if (!exists) {
|
|
|
UI.error(`Command "${args.command}" not found`)
|
|
|
- return
|
|
|
+ process.exit(1)
|
|
|
}
|
|
|
}
|
|
|
const session = await (async () => {
|
|
|
@@ -104,7 +104,7 @@ export const RunCommand = cmd({
|
|
|
|
|
|
if (!session) {
|
|
|
UI.error("Session not found")
|
|
|
- return
|
|
|
+ process.exit(1)
|
|
|
}
|
|
|
|
|
|
const cfg = await Config.get()
|
|
|
@@ -221,6 +221,7 @@ export const RunCommand = cmd({
|
|
|
if (errorMsg) process.stdout.write(errorMsg)
|
|
|
}
|
|
|
UI.empty()
|
|
|
+ if (errorMsg) process.exit(1)
|
|
|
})
|
|
|
},
|
|
|
})
|