feat(find_in_files): clear file list and log if no matches are found
This commit is contained in:
parent
400af298d7
commit
dcddd373b5
2 changed files with 19 additions and 5 deletions
|
@ -179,6 +179,8 @@ const Process = struct {
|
|||
var exit_code: i64 = undefined;
|
||||
if (try m.match(.{ tp.any, tp.any, "exited", 0 })) {
|
||||
self.logger.print("found {d} matches", .{self.match_count});
|
||||
} else if (try m.match(.{ tp.any, tp.any, "exited", 1 })) {
|
||||
self.logger.print("no matches found", .{});
|
||||
} else if (try m.match(.{ tp.any, tp.any, "error.FileNotFound", 1 })) {
|
||||
self.logger.print_err(ripgrep_binary, "'{s}' executable not found", .{ripgrep_binary});
|
||||
} else if (try m.match(.{ tp.any, tp.any, tp.extract(&err_msg), tp.extract(&exit_code) })) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue