1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-21 23:38:49 -05:00

Give error message when --files will do nothing

Point people towards the help when using "pacman -F" or "pacman -F foo".

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2015-12-14 23:17:26 +10:00
parent d721bae443
commit 686fae6d74

View File

@ -294,7 +294,7 @@ int pacman_files(alpm_list_t *targets)
}
}
if(targets == NULL && (config->op_s_search || config->op_q_owns)) {
if(targets == NULL && (config->op_q_owns | config->op_s_search)) {
pm_printf(ALPM_LOG_ERROR, _("no targets specified (use -h for help)\n"));
return 1;
}
@ -314,6 +314,11 @@ int pacman_files(alpm_list_t *targets)
return files_list(files_dbs, targets);
}
if(targets != NULL) {
pm_printf(ALPM_LOG_ERROR, _("no options specified (use -h for help)\n"));
return 1;
}
return 0;
}