Skip to content

Commit

Permalink
#1279: Use sudo_support and for_app in pacman_not_found
Browse files Browse the repository at this point in the history
  • Loading branch information
scorphus committed Mar 28, 2022
1 parent abd96ae commit 3de471f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions thefuck/rules/pacman_not_found.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
yay -S llvm
"""

from thefuck.utils import replace_command
from thefuck.utils import for_app, replace_command
from thefuck.specific.archlinux import get_pkgfile, archlinux_env
from thefuck.specific.sudo import sudo_support


@sudo_support
@for_app('pacman', 'pikaur', 'yaourt', 'yay')
def match(command):
return (command.script_parts
and (command.script_parts[0] in ('pacman', 'yay', 'pikaur', 'yaourt')
or command.script_parts[0:2] == ['sudo', 'pacman'])
and 'error: target not found:' in command.output)
return 'error: target not found:' in command.output


def get_new_command(command):
Expand Down

0 comments on commit 3de471f

Please sign in to comment.