mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									f6ad4908bc
								
							
						
					
					
						commit
						e644632198
					
				
					 1 changed files with 3 additions and 7 deletions
				
			
		| 
						 | 
					@ -634,13 +634,9 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state,
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		case 'v':
 | 
							case 'v':
 | 
				
			||||||
#if defined SWAY_GIT_VERSION && defined SWAY_GIT_BRANCH && defined SWAY_VERSION_DATE
 | 
								fprintf(stdout, "swaylock version " SWAY_VERSION "\n");
 | 
				
			||||||
			fprintf(stdout, "swaylock version %s (%s, branch \"%s\")\n",
 | 
								exit(EXIT_SUCCESS);
 | 
				
			||||||
					SWAY_GIT_VERSION, SWAY_VERSION_DATE, SWAY_GIT_BRANCH);
 | 
								break;
 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
			fprintf(stdout, "version unknown\n");
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
			return 1;
 | 
					 | 
				
			||||||
		case LO_BS_HL_COLOR:
 | 
							case LO_BS_HL_COLOR:
 | 
				
			||||||
			if (state) {
 | 
								if (state) {
 | 
				
			||||||
				state->args.colors.bs_highlight = parse_color(optarg);
 | 
									state->args.colors.bs_highlight = parse_color(optarg);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue