[pacman-dev] [PATCH] pacman: print error message for -F with invalid regex

morganamilo morganamilo at gmail.com
Wed Nov 6 02:00:32 UTC 2019


diff --git a/src/pacman/files.c b/src/pacman/files.c
index 19191dd8..05b6f223 100644
--- a/src/pacman/files.c
+++ b/src/pacman/files.c
@@ -115,7 +115,8 @@ static int files_search(alpm_list_t *syncs, alpm_list_t *targets, int regex) {
 
 		if(regex) {
 			if(regcomp(&reg, targ, REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE) != 0) {
-				/* TODO: error message */
+				pm_printf(ALPM_LOG_ERROR,
+						_("search failed: invalid regular expression '%s'\n"), targ);
 				goto notfound;
 			}
 		}
-- 
2.23.0


More information about the pacman-dev mailing list