File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ void App::defaultActions() {
283
283
}
284
284
285
285
// if file mode is enabled, and no input file is specified, throw an exception
286
- if (!interactiveMode && inputFilePath.empty ()) {
286
+ if (!interactiveMode && inputFilePath.empty () && !showHelp ) {
287
287
throw std::invalid_argument (" Input file not specified, use -h or --help for usage information." );
288
288
}
289
289
Original file line number Diff line number Diff line change 5
5
6
6
#include " app.hpp"
7
7
8
- int main (int argc, char *argv[])
9
- {
8
+ int main (int argc, char *argv[]) {
10
9
// Create an App object and run the application
11
- try
12
- {
10
+ try {
13
11
TINY::SCANNER::App app (argc, argv);
14
12
app.run ();
15
- }
16
- catch (std::exception &e)
17
- {
13
+ } catch (std::exception &e) {
18
14
// set color to red
19
15
std::cout << " \033 [1;31m" ;
20
16
std::cerr << " Error: " << e.what () << std::endl;
17
+ // reset
18
+ std::cout << " \033 [0m" ;
21
19
return EXIT_FAILURE;
22
20
}
23
21
return EXIT_SUCCESS;
You can’t perform that action at this time.
0 commit comments