mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
grep: Don't end the program early after failing to grep a file
We should still try to read remaining files.
This commit is contained in:
parent
94eb31865a
commit
5a85449b23
Notes:
sideshowbarker
2024-07-17 02:28:18 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/5a85449b23 Pull-request: https://github.com/SerenityOS/serenity/pull/21080 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/BertalanD Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/tcl3
@ -281,10 +281,8 @@ ErrorOr<int> serenity_main(Main::Arguments args)
|
||||
bool print_filename { files.size() > 1 };
|
||||
for (auto& filename : files) {
|
||||
auto result = handle_file(filename, print_filename);
|
||||
if (result.is_error()) {
|
||||
if (!suppress_errors)
|
||||
warnln("Failed with file {}: {}", filename, result.release_error());
|
||||
return 1;
|
||||
if (result.is_error() && !suppress_errors) {
|
||||
warnln("Failed with file {}: {}", filename, result.release_error());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user