From ca62a2cfa6c62599544b3cf086ca8982251d5c70 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 25 Jun 2008 11:00:25 -0400 Subject: Error out if package isn't found instead of listing all properties. --- src/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 4db4289..615de8c 100644 --- a/src/main.c +++ b/src/main.c @@ -85,9 +85,13 @@ list_properties(const char *package_name, uint32_t type) uint32_t flags; set = razor_set_open(repo_filename); - if (package_name) + if (package_name) { package = razor_set_get_package(set, package_name); - else + if (!package) { + fprintf(stderr, "no package named \"%s\"\n", package_name); + return 1; + } + } else package = NULL; pi = razor_property_iterator_create(set, package); -- cgit v1.2.3