Skip to content

Commit fce1b64

Browse files
classabbyampDuncaen
authored andcommitted
bin/xbps-dgraph: print usage if package is not given
fixes: #614
1 parent c29f93e commit fce1b64

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/xbps-dgraph/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,10 @@ main(int argc, char **argv)
594594
/* NOTREACHED */
595595
}
596596
pkg = *argv;
597+
if (!pkg) {
598+
usage(true);
599+
/* NOTREACHED */
600+
}
597601

598602
/* Initialize libxbps */
599603
memset(&xh, 0, sizeof(xh));

0 commit comments

Comments
 (0)