File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ use std::str::FromStr;
13
13
use license:: License ;
14
14
use std:: ffi:: OsStr ;
15
15
use std:: fmt:: Write ;
16
+ use std:: process:: exit;
16
17
17
18
struct Info {
18
19
project_name : String ,
@@ -167,20 +168,23 @@ fn main() {
167
168
let language = match get_dominant_language ( & tokei_langs) {
168
169
Some ( language) => language,
169
170
None => {
170
- eprintln ! ( "Could not find any source code in this directory." ) ;
171
+ eprintln ! ( "Error: Could not find any source code in this directory." ) ;
171
172
return ;
172
173
}
173
174
} ;
174
175
175
176
if !is_git_installed ( ) {
176
- eprintln ! ( "Could not execute git for project information." ) ;
177
+ eprintln ! ( "Error: Could not execute git for project information." ) ;
177
178
return ;
178
179
}
179
180
180
181
let authors = get_authors ( 3 ) ;
181
182
let config: Configuration = match get_configuration ( ) {
182
183
Ok ( config) => config,
183
- Err ( _) => panic ! ( "Could not retrieve git configuration data" ) ,
184
+ Err ( _) => {
185
+ eprintln ! ( "Error: Could not retrieve git configuration data" ) ;
186
+ exit ( 1 ) ;
187
+ }
184
188
} ;
185
189
186
190
You can’t perform that action at this time.
0 commit comments