summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2015-12-14 14:17:26 +0100
committerAllan McRae <allan@archlinux.org>2015-12-15 11:15:04 +0100
commit686fae6d74c79310b5a8da04414a07ed9da299e1 (patch)
tree209ad09824858fab559aa5187ab52c3e3b010ccd /src
parentd721bae443fe020bf755d0440684a17b75de970f (diff)
downloadpacman-686fae6d74c79310b5a8da04414a07ed9da299e1.tar.gz
pacman-686fae6d74c79310b5a8da04414a07ed9da299e1.tar.xz
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.c7
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;
}