@@ -48,7 +48,7 @@ fn main() {
4848 "" ,
4949 Diagnostic :: error ( git_repos_result. err ( ) . unwrap ( ) . as_str ( ) ) ,
5050 ) ;
51- return ;
51+ std :: process :: exit ( 1 ) ;
5252 }
5353
5454 let repos = git_repos_result. ok ( ) . unwrap ( ) ;
@@ -65,7 +65,7 @@ fn main() {
6565 & query,
6666 Diagnostic :: error ( git_repos_result. err ( ) . unwrap ( ) . as_str ( ) ) ,
6767 ) ;
68- return ;
68+ std :: process :: exit ( 1 ) ;
6969 }
7070
7171 let repos = git_repos_result. ok ( ) . unwrap ( ) ;
@@ -94,7 +94,7 @@ fn launch_gitql_repl(arguments: &Arguments) {
9494 "" ,
9595 Diagnostic :: error ( git_repos_result. err ( ) . unwrap ( ) . as_str ( ) ) ,
9696 ) ;
97- return ;
97+ std :: process :: exit ( 1 ) ;
9898 }
9999
100100 let git_repositories = git_repos_result. ok ( ) . unwrap ( ) ;
@@ -186,19 +186,19 @@ fn execute_gitql_query(
186186 if tokenizer_result. is_err ( ) {
187187 let diagnostic = tokenizer_result. err ( ) . unwrap ( ) ;
188188 reporter. report_diagnostic ( & query, * diagnostic) ;
189- return ;
189+ std :: process :: exit ( 1 ) ;
190190 }
191191
192192 let tokens = tokenizer_result. ok ( ) . unwrap ( ) ;
193193 if tokens. is_empty ( ) {
194- return ;
194+ std :: process :: exit ( 1 ) ;
195195 }
196196
197197 let parser_result = parser:: parse_gql ( tokens, env) ;
198198 if parser_result. is_err ( ) {
199199 let diagnostic = parser_result. err ( ) . unwrap ( ) ;
200200 reporter. report_diagnostic ( & query, * diagnostic) ;
201- return ;
201+ std :: process :: exit ( 1 ) ;
202202 }
203203
204204 let query_node = parser_result. ok ( ) . unwrap ( ) ;
@@ -213,7 +213,7 @@ fn execute_gitql_query(
213213 if evaluation_result. is_err ( ) {
214214 let exception = Diagnostic :: exception ( & evaluation_result. err ( ) . unwrap ( ) ) ;
215215 reporter. report_diagnostic ( "" , exception) ;
216- return ;
216+ std :: process :: exit ( 1 ) ;
217217 }
218218
219219 let printer: Box < dyn BaseOutputPrinter > = match arguments. output_format {
0 commit comments