summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-12-08 08:30:58 +0200
committerTimo Teräs <timo.teras@iki.fi>2014-12-08 08:31:41 +0200
commit02cd5a9c76cd676545c232bb567d7eb01e5bd6fd (patch)
treece05b50bff40784b36c310eee0916be229e640b2 /src/search.c
parent6697ed5e86e64516ac56894d2f81c575ff72fd4f (diff)
downloadapk-tools-02cd5a9c76cd676545c232bb567d7eb01e5bd6fd.tar.gz
apk-tools-02cd5a9c76cd676545c232bb567d7eb01e5bd6fd.tar.bz2
apk-tools-02cd5a9c76cd676545c232bb567d7eb01e5bd6fd.tar.xz
apk-tools-02cd5a9c76cd676545c232bb567d7eb01e5bd6fd.zip
make del, fetch, fix and info return errors
In case all applet arguments are packages names (that is are not including wildcards), return error if they do not match to some package.
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/search.c b/src/search.c
index 4e7c730..47339fd 100644
--- a/src/search.c
+++ b/src/search.c
@@ -145,6 +145,8 @@ static void print_result(struct apk_database *db, const char *match, struct apk_
struct apk_provider *p;
struct apk_package *pkg = NULL;
+ if (!name) return;
+
if (ctx->show_all) {
foreach_array_item(p, name->providers)
print_result_pkg(ctx, p->pkg);