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()