
    <Bh                     d    S r SSKrSSKrSSKJrJrJrJr  SSKJ	r	  S\S\4S jr
S\S	\S\4S
 jrg)zaCLI implementation for `conda run`.

Runs the provided command within the specified environment.
    N)	REMAINDERArgumentParser	Namespace_SubParsersAction)	getLoggersub_parsersreturnc                    SSK Jn  SSKJn  SSKJn  SSKJnJn  SnUnU" S5      n	U R                  "  SUUU	S	.UD6n
U" U
5        U" U
5        U
R                  S
USSUS9  U
R                  SUSSUS9  U
R                  SS[        R                  " 5       S9  U
R                  SSSSSS9  U
R                  S[        SS9  U
R                  SS9  U
$ ) N   )dals)NULL   )NullCountAction)add_parser_prefixadd_parser_verbosez)Run an executable in a conda environment.z
        Example::

        $ conda create -y -n my-python-env python=3
        $ conda run -n my-python-env python --version
        )helpdescriptionepilogz--devzSets `CONDA_EXE` to `python -m conda`, assuming the current working directory contains the root of conda development sources. This is mainly for use during tests where we test new conda sources against old Python versions.dev)actionr   destdefaultz--debug-wrapper-scriptszWhen this is set, where implemented, the shell wrapper scriptswill use the echo command to print debugging information to stderr (standard error).debug_wrapper_scriptsz--cwdzCurrent working directory for command to run in. Defaults to the user's current working directory if no directory is specified.)r   r   z--no-capture-outputz--live-stream
store_truez:Don't capture stdout/stderr (standard out/standard error).F)r   r   r   executable_callzXExecutable name, with additional arguments to be passed to the executable on invocation.)nargsr   zconda.cli.main_run.execute)func)run)
auxlib.ishr   common.constantsr   actionsr   helpersr   r   
add_parseradd_argumentosgetcwdr   set_defaults)r   kwargsr   r   r   r   r   summaryr   r   ps              2lib/python3.13/site-packages/conda/cli/main_run.pyconfigure_parserr,      s+   !'(>9GK	F 				
 	A aqNN'   	 NN!# %   NNM			   NNI   NN   NN4N5H    argsparserc           	         SSK Jn  SSKJn  SSKJn  SSKJn  SSKJ	n  SSK
Jn  UR                  5       nUR                  5         U" UR                  [        UR                   5      U R"                  U R$                  U R&                  SS	9u  pU" U
U" [(        R*                  R-                  5       5      U R.                  S
U R0                  (       + S9nU R0                  (       df  UR2                  (       a"  [5        UR2                  [6        R2                  S9  UR8                  (       a"  [5        UR8                  [6        R8                  S9  UR:                  S:w  a=  [=        [>        5      nURA                  SSRC                  U R&                  5       S35        S[(        R*                  ;  a  U" U	5        UR:                  $ [=        [>        5      nURE                  SU	 35        UR:                  $ )Nr   )context)encode_environment)
PrefixData)rm_rf)subprocess_call)wrap_subprocess_callT)use_system_tmp_pathF)envpathraise_on_errorcapture_output)filer   z`conda run  z` failed. (See above for error)CONDA_TEST_SAVE_TEMPSz3CONDA_TEST_SAVE_TEMPS :: retaining main_run script )#base.contextr1   common.compatr2   core.prefix_datar3   gateways.disk.deleter4   gateways.subprocessr5   utilsr6   from_contextassert_environmentroot_prefixstrprefix_pathr   r   r   r%   environcopycwdno_capture_outputstdoutprintsysstderrrcr   __name__errorjoinwarning)r.   r/   r1   r2   r3   r4   r5   r6   prefix_datascriptcommandresponselogs                r+   executer\   X   sn   &2-,5,))+K""$*K##$"" OF rzz01XX111H !!??(//

3??(//

3 {{a!		#((4#7#7899XY	

 bjj0f
 ;; !I&RS;;r-   )__doc__r%   rP   argparser   r   r   r   loggingr   r,   intr\    r-   r+   <module>rb      sM   
 
 
 L L G"3 G. GT2) 2^ 2 2r-   