
    l:ik                         d dl Z d dlmZmZ d dlmZmZmZmZm	Z	m
Z
  e j                  d      Z ed      d        ZddiZed	        Z e
d      r  e	 e
d            e      Zd
 Zy)    N)PopenPIPE)for_appeagerreplace_commandreplace_argumentcachewhichzerror Command "(.*)" not found.yarnc                 @    t         j                  | j                        S )N)regexfindalloutput)commands    [/var/www/html/bot/venv/lib/python3.12/site-packages/thefuck/rules/yarn_command_not_found.pymatchr   	   s    ==((    requireaddc               #      K   t        ddgt              } d}| j                  j                         D ]E  }|j	                         j                         }d|v rd}(|s+d|v s0|j                  d      d	    G y w)
Nr   z--help)stdoutFz	Commands:Tz-  )r   r   r   	readlinesdecodestripsplit)procshould_yieldlines      r   _get_all_tasksr!      sx     &(#D1DL%%' &{{}""$$LDDL**S/"%%&s   AA;A;"A;c                     t         j                  | j                        d   }|t        v r t        |   }t	        | j
                  ||      S t               }t        | ||      S )Nr   )r   r   r   npm_commandsr   scriptr!   r   )r   misspelled_taskyarn_commandtaskss       r   get_new_commandr(   $   sU    mmGNN3A6O,&#O4NN w??r   )re
subprocessr   r   thefuck.utilsr   r   r   r   r	   r
   compiler   r   r#   r!   r(    r   r   <module>r.      s    	 ") ) 	

56 	) ) 5! & & 	=)U5=).9N@r   