From 348640423ddf5d7834db9c15a8c13e1c66ddd026 Mon Sep 17 00:00:00 2001 From: Pablo Santiago Blum de Aguiar Date: Mon, 28 Mar 2022 19:52:02 +0200 Subject: [PATCH] #1279: Use sudo_support and for_app in pacman_not_found --- thefuck/rules/pacman_not_found.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/thefuck/rules/pacman_not_found.py b/thefuck/rules/pacman_not_found.py index c1ce292..b147918 100644 --- a/thefuck/rules/pacman_not_found.py +++ b/thefuck/rules/pacman_not_found.py @@ -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):