forked from mirrors/qmk_userspace
		
	qmk find: Fix failure with multiple filters (#22497)
		
	When multiple `-f FILTER` options were specified, `qmk find` did not return anything at all instead of printing the list of entries that matched all of the specified filters. The problem was that the statement in `_filter_keymap_targets()` that filled `targets` had a wrong indent and therefore was executed for every filter instead of only once after applying all filters, and `valid_keymaps` was actually an iterator and therefore could be used only once. Moving the statement outside of the loop fixes the problem.
This commit is contained in:
		
					parent
					
						
							
								bf3a88ab57
							
						
					
				
			
			
				commit
				
					
						62cca5c43a
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -172,7 +172,7 @@ def _filter_keymap_targets(target_list: List[Tuple[str, str]], filters: List[str
 | 
				
			||||||
                cli.log.warning(f'Unrecognized filter expression: {filter_expr}')
 | 
					                cli.log.warning(f'Unrecognized filter expression: {filter_expr}')
 | 
				
			||||||
                continue
 | 
					                continue
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            targets = [KeyboardKeymapBuildTarget(keyboard=e[0], keymap=e[1], json=e[2]) for e in valid_keymaps]
 | 
					        targets = [KeyboardKeymapBuildTarget(keyboard=e[0], keymap=e[1], json=e[2]) for e in valid_keymaps]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return targets
 | 
					    return targets
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue