#1279: Use sudo_support and for_app in pacman_not_found
This commit is contained in:
parent
9ed4117175
commit
348640423d
|
|
@ -6,15 +6,15 @@ should be:
|
|||
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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue