Skip to content

Commit

Permalink
fix: correctly parse cli arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
johanengstrand committed Dec 25, 2022
1 parent a1d453e commit 5ee9cae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dwl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3296,7 +3296,7 @@ main(int argc, char *argv[])
int c;
char *startup_cmd = NULL, *runtimedir = NULL, *exp = NULL;

while ((c = getopt(argc, argv, "s:c:e:h:v")) != -1) {
while ((c = getopt(argc, argv, "s:c:e:hv")) != -1) {
if (c == 's')
startup_cmd = optarg;
else if (c == 'c')
Expand All @@ -3308,8 +3308,6 @@ main(int argc, char *argv[])
else
goto usage;
}
if (optind < argc)
goto usage;

// Wayland requires XDG_RUNTIME_DIR for creating its communications
// socket
Expand Down

0 comments on commit 5ee9cae

Please sign in to comment.