diff options
author | Allan McRae <allan@archlinux.org> | 2015-12-14 23:17:26 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2015-12-15 20:15:04 +1000 |
commit | 686fae6d74c79310b5a8da04414a07ed9da299e1 (patch) | |
tree | 209ad09824858fab559aa5187ab52c3e3b010ccd /src | |
parent | d721bae443fe020bf755d0440684a17b75de970f (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/files.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pacman/files.c b/src/pacman/files.c index fb2f997e..3b0b356b 100644 --- a/src/pacman/files.c +++ b/src/pacman/files.c @@ -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; } |