+
    :1j                    R   R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHtHtHt ^ RIHt ^RIHt ^R	IHt ^R
IHt ^RIHt ^RIHtHt ^RIHt ^RIHt ^RI H!t! ]'       d   ^ RI"H#t# ^ RI$H%t% ]! ]&4      t']! RR4      t(R t)RR R llt*RR R llt+RR lt,RR lt-R# )z!Helpler functions for subprocess.)annotationsN)
namedtuple)	getLogger)abspath)PIPECalledProcessErrorPopen)TYPE_CHECKING)ACTIVE_SUBPROCESSES)shlex_split_unicodedals)context)encode_environment
isiterable)TRACE)rm_rf)wrap_subprocess_call)Sequence)PathResponsec                ,    \        R 4      WW#V3,          # )zp
    $ %s
    ==> cwd: %s <==
    ==> exit code: %d <==
    ==> stdout <==
    %s
    ==> stderr <==
    %s
    r   )command_strcwdrcstdoutstderrs   &&&&&9lib/python3.14/site-packages/conda/gateways/subprocess.py_format_outputr       s%    	
 
2v.
/ 
/    c                   V ^8  d   QhRR/# )   argszSequence[str] )formats   "r   __annotate__r%   .   s     . . .r   c           	        \        \        P                  V\        P                  \        P                  V 4      w  rE\        TT;'       g    TR \        \        VR7      pVP                  4       w  rxVe8   R\        P                  9  d   \        V4       M\        P                  RV4       \        VR4      '       d   VP                  RRR7      p\        VR4      '       d   VP                  RRR7      pWxVP                  3# )F)r   universal_newlinesr   r   envCONDA_TEST_SAVE_TEMPSz4CONDA_TEST_SAVE_TEMPS :: retaining pip run_script %sdecodezutf-8replace)errors)r   r   root_prefixdevdebugr   r   communicateosenvironr   logwarninghasattrr*   
returncode)	r"   prefixr(   r   script_callercommand_argsprocessr   r   s	   &&&&     r   any_subprocessr;   .   s    "6#M MM6 G ((*NF ""**4- KKF vx  wy9vx  wy97----r   c               0    V ^8  d   QhRRRRRRRRR	R
RR
/# )r!   commandz=str | os.PathLike | Path | Sequence[str | os.PathLike | Path]r(   zdict[str, str] | Nonepathzstr | os.PathLike | Path | Nonestdinz
str | Noneraise_on_errorboolcapture_outputr#   )r$   s   "r   r%   r%   M   sD     8- 8-J8-	8- *8- 	8-
 8- 8-r   c                   \        T;'       g    \        P                  4      pVf   \        P                  M
\        V4      p\        V 4      '       g   \        V 4      p  \        P                  ! V 4      p\        P                  RV4       RpV'       d   \        pMV'       d   \        R4      hRp\!        V VVVVVRRR7      p	\"        P$                  ! V	4       V	P'                  VR7      w  rV	P(                  p\"        P*                  ! V	4       V'       d   V^ 8w  g    \        P-                  \.        4      '       d   \1        WvWV4      pV'       d*   V^ 8w  d#   \        P3                  X4       \5        WVR	7      h\        P-                  \.        4      '       d   \        P                  \.        X4       \7        W\9        V4      4      #   \         d.    RP                  \        \        P                  T 4      4      p ELi ; i)
zkThis utility function should be preferred for all conda subprocessing.
It handles multiple tricky details.
N zexecuting>> %sz/When passing stdin, output needs to be capturedTr+   )r   r?   r   r   r(   textr,   )input)output)r   r1   r2   sysr7   r   r   r   fspath	TypeErrorjoinmapr3   r/   r   
ValueErrorr   r
   addr0   r6   removeisEnabledForr   r   infor   r   int)r=   r(   r>   r?   r@   rB   r   r   piper:   r   r   r   formatted_outputs   &&&&&&        r   subprocess_callrU   M   s    S..BJJ
/C#**'$-Cg%g.8ii( II,D	JKK 	G G$ ((u(5NF			Bw'27s'7'7'>'>)+BO"'!" 5EFF
'(FCG,,O  8hhs299g678s    G 4HHc                    . pV'       d   VP                  R4       V'       d   VP                  R4       V F  pW@9   g   K  W K  	  R# )
PYTHONPATHN)rW   
PYTHONHOME)
CONDA_ROOTCONDA_PROMPT_MODIFIER	CONDA_EXECONDA_DEFAULT_ENV)extend)r(   clean_pythonclean_condadelskeys   &&&  r   _subprocess_clean_envrb      s?    D01U	
 : r   c                r    \         P                  P                  4       p\        WdV4       \	        WWVR 7      # ))r(   r>   r?   r@   )r1   r2   copyrb   rU   )r=   r>   r?   r@   r^   r_   r(   s   &&&&&& r   subprocess_call_with_clean_envre      s2     **//
C#[9t r   )r   r   r   )NN)NNNTT)TT)NNTTT).__doc__
__future__r   r1   rH   collectionsr   loggingr   os.pathr   
subprocessr   r   r   typingr	    r
   auxlib.compatr   
auxlib.ishr   base.contextr   common.compatr   r   common.constantsr   gateways.disk.deleter   utilsr   collections.abcr   pathlibr   __name__r3   r   r   r;   rU   rb   re   r#   r   r   <module>rx      sw    ( " 	 
 "   6 6   " /  " : $ ( ((j"<=/.>8-v
r   