File tree Expand file tree Collapse file tree
packages/opencode/src/cli/cmd Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,15 +71,15 @@ export const RunCommand = cmd({
7171
7272 if ( message . trim ( ) . length === 0 && ! args . command ) {
7373 UI . error ( "You must provide a message or a command" )
74- return
74+ process . exit ( 1 )
7575 }
7676
7777 await bootstrap ( process . cwd ( ) , async ( ) => {
7878 if ( args . command ) {
7979 const exists = await Command . get ( args . command )
8080 if ( ! exists ) {
8181 UI . error ( `Command "${ args . command } " not found` )
82- return
82+ process . exit ( 1 )
8383 }
8484 }
8585 const session = await ( async ( ) => {
@@ -104,7 +104,7 @@ export const RunCommand = cmd({
104104
105105 if ( ! session ) {
106106 UI . error ( "Session not found" )
107- return
107+ process . exit ( 1 )
108108 }
109109
110110 const cfg = await Config . get ( )
@@ -221,6 +221,7 @@ export const RunCommand = cmd({
221221 if ( errorMsg ) process . stdout . write ( errorMsg )
222222 }
223223 UI . empty ( )
224+ if ( errorMsg ) process . exit ( 1 )
224225 } )
225226 } ,
226227} )
You can’t perform that action at this time.
0 commit comments