summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--find/parser.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 9b5a1c55..6fc71d64 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
** Bug Fixes
#45585: unclear description of -newerXY in manual page.
+#45505: give a more explicit error message when the argument to -regex
+ is not a valid regular expression.
+
#45090: oldfind incorrectly omits test/..test (or any file whose name
begins with ..).
diff --git a/find/parser.c b/find/parser.c
index 0d19ba3c..b6d966aa 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -2115,7 +2115,8 @@ insert_regex (char **argv,
error_message = re_compile_pattern (rx, strlen (rx), re);
if (error_message)
- error (EXIT_FAILURE, 0, "%s", error_message);
+ error (EXIT_FAILURE, 0, "failed to compile regular expression '%s': %s",
+ rx, error_message);
our_pred->est_success_rate = estimate_pattern_match_rate (rx, 1);
return true;
}