From 7bc619385b85fa09da2aaca4076ba35955de3538 Mon Sep 17 00:00:00 2001 From: Chris De Pasquale <30823132+chrisdepas@users.noreply.github.com> Date: Tue, 11 Dec 2018 11:01:17 +1100 Subject: [PATCH] Fixed incorrect ordering of for_app and sudo_support causing apt_invalid_operation and dnf_no_such_command rules to fail (#861) --- thefuck/rules/apt_invalid_operation.py | 2 +- thefuck/rules/dnf_no_such_command.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/thefuck/rules/apt_invalid_operation.py b/thefuck/rules/apt_invalid_operation.py index 27e96a85..076109ba 100644 --- a/thefuck/rules/apt_invalid_operation.py +++ b/thefuck/rules/apt_invalid_operation.py @@ -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 diff --git a/thefuck/rules/dnf_no_such_command.py b/thefuck/rules/dnf_no_such_command.py index 9a70c4f1..579f5781 100644 --- a/thefuck/rules/dnf_no_such_command.py +++ b/thefuck/rules/dnf_no_such_command.py @@ -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()