
    3i                    d    d dl mZ d dlZd dlmZ d dlmZ erd dlmZ dZ	 G d d      Z
dd	Zd
Zy)    )annotationsN)quote)TYPE_CHECKING)Mappingl        c                      e Zd ZdddZddZy)LogCmdNc                     || _         || _        y N)cmdenv)selfr   r   s      V/var/www/opsc/venv/lib/python3.12/site-packages/virtualenv/util/subprocess/__init__.py__init__zLogCmd.__init__   s        c                    dj                  d | j                  D              }| j                  | d| j                  }|S )N c              3  D   K   | ]  }t        t        |              y wr
   )r   str).0cs     r   	<genexpr>z"LogCmd.__repr__.<locals>.<genexpr>   s     <aE#a&M<s    z env of )joinr   r   )r   cmd_reprs     r   __repr__zLogCmd.__repr__   s=    88<488<<88"8DHH<8Hr   r
   )r   	list[str]r   zMapping[str, str] | NonereturnNone)r   r   )__name__
__module____qualname__r   r    r   r   r   r      s    r   r   c                b   	 t        j                  | dt         j                  t         j                  t         j                  d      }|j                         \  }}|j                  }|||fS # t
        $ r:}|j                  d|j                  }}}|dk(  r|d|v rt        |      }Y d }~Cd }~ww xY w)NTzutf-8)universal_newlinesstdinstderrstdoutencoding    file)	
subprocessPopenPIPEcommunicate
returncodeOSErrorerrnostrerrorr   )r   processouterrcodeerrors         r   run_cmdr8      s    ""#//????
 &&(S!!
 c>	  b%..3c19Vs]e*Cs   A$A+ +	B.40B))B.)CREATE_NO_WINDOWr   r8   )r   r   r   ztuple[int, str, str])
__future__r   r+   shlexr   typingr   collections.abcr   r9   r   r8   __all__r!   r   r   <module>r?      s3    "    ' 	 	&r   