From 84f332ce5b4b6d723479c52dda141a74380ea5ff Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sun, 29 Dec 2024 14:42:50 -0500 Subject: [PATCH] bin/xbps-dgraph: print usage if package is not given fixes: #614 --- bin/xbps-dgraph/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/xbps-dgraph/main.c b/bin/xbps-dgraph/main.c index 5f6eee08..92404e67 100644 --- a/bin/xbps-dgraph/main.c +++ b/bin/xbps-dgraph/main.c @@ -594,6 +594,10 @@ main(int argc, char **argv) /* NOTREACHED */ } pkg = *argv; + if (!pkg) { + usage(true); + /* NOTREACHED */ + } /* Initialize libxbps */ memset(&xh, 0, sizeof(xh));