From 686fae6d74c79310b5a8da04414a07ed9da299e1 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Mon, 14 Dec 2015 23:17:26 +1000 Subject: 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 --- src/pacman/files.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3-70-g09d2