diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-16 00:08:00 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-16 00:09:16 +1000 |
commit | e64463219838b10bcae3a97998e5f7fe5b09298e (patch) | |
tree | 5d689f2054361f6f4383526977900b880ea3e6c8 | |
parent | f6ad4908bc2f366ccbee18889ffe35c7ee436389 (diff) | |
download | sway-e64463219838b10bcae3a97998e5f7fe5b09298e.tar.xz |
Fix swaylock version string
The referenced constants were not defined so it always printed "version
unknown".
Also it would exit with code 1. It now exits with code 0.
-rw-r--r-- | swaylock/main.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/swaylock/main.c b/swaylock/main.c index 04c0bb07..86dfd577 100644 --- a/swaylock/main.c +++ b/swaylock/main.c @@ -634,13 +634,9 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state, } break; case 'v': -#if defined SWAY_GIT_VERSION && defined SWAY_GIT_BRANCH && defined SWAY_VERSION_DATE - fprintf(stdout, "swaylock version %s (%s, branch \"%s\")\n", - SWAY_GIT_VERSION, SWAY_VERSION_DATE, SWAY_GIT_BRANCH); -#else - fprintf(stdout, "version unknown\n"); -#endif - return 1; + fprintf(stdout, "swaylock version " SWAY_VERSION "\n"); + exit(EXIT_SUCCESS); + break; case LO_BS_HL_COLOR: if (state) { state->args.colors.bs_highlight = parse_color(optarg); |