summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c8
1 files 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);