mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 15:12:20 +00:00 
			
		
		
		
	Fixed incorrect ordering of for_app and sudo_support causing apt_invalid_operation and dnf_no_such_command rules to fail (#861)
This commit is contained in:
		
				
					committed by
					
						 Vladimir Iakovlev
						Vladimir Iakovlev
					
				
			
			
				
	
			
			
			
						parent
						
							d86dd5f179
						
					
				
				
					commit
					7bc619385b
				
			| @@ -6,8 +6,8 @@ from thefuck.utils import for_app, eager, replace_command | ||||
| enabled_by_default = apt_available | ||||
|  | ||||
|  | ||||
| @for_app('apt', 'apt-get', 'apt-cache') | ||||
| @sudo_support | ||||
| @for_app('apt', 'apt-get', 'apt-cache') | ||||
| def match(command): | ||||
|     return 'E: Invalid operation' in command.output | ||||
|  | ||||
|   | ||||
| @@ -8,8 +8,8 @@ from thefuck.specific.dnf import dnf_available | ||||
| regex = re.compile(r'No such command: (.*)\.') | ||||
|  | ||||
|  | ||||
| @for_app('dnf') | ||||
| @sudo_support | ||||
| @for_app('dnf') | ||||
| def match(command): | ||||
|     return 'no such command' in command.output.lower() | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user