On 09/09/19 at 05:49pm, morganamilo wrote:
Error messages are now printed. Pacman now returns 1 if any of the files queried are not found. --- src/pacman/files.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/pacman/files.c b/src/pacman/files.c index 8e518486..c4351114 100644 --- a/src/pacman/files.c +++ b/src/pacman/files.c @@ -115,7 +115,6 @@ static int files_search(alpm_list_t *syncs, alpm_list_t *targets, int regex) {
if(regex) { if(regcomp(®, targ, REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE) != 0) { - /* TODO: error message */ goto notfound;
...
notfound: - if(!found) { - ret++; + ret = 1; + if(regex) { + pm_printf(ALPM_LOG_ERROR, _("no files match '%s'\n"), targ);
"no files match" isn't really a great error message if the real problem is that the regex failed to even compile.