
    \Zi                      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  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R                  SSUSS9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S9  UR                  S [         S!S"9  UR#                  S#S$9  U$ )&N   )dals)NULL)
deprecated   )NullCountAction)add_parser_prefixadd_parser_verbosez)Run an executable in a conda environment.aJ  
        Example::

        $ conda create -y -n my-python-env python=3
        $ conda run -n my-python-env python --version

        Use '--' to separate `conda run`'s options from the executable's options::

        $ conda run -n my-python-env -- python -v
        $ conda run -v -n my-python-env -- tar -tvf file.tar
        )helpdescriptionepilogz--devz26.9z27.3z2Set `PYTHONPATH` to the conda source root instead.)addendumzSets `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-sz--no-capture-outputz--live-stream
store_truez:Don't capture stdout/stderr (standard out/standard error).F)r   r   r   executable_callzExecutable name, with additional arguments to be passed to the executable on invocation. Use '--' to separate conda options from executable options.)nargsr   zconda.cli.main_run.execute)func)run)
auxlib.ishr   common.constantsr   deprecationsr   actionsr   helpersr   r   
add_parseradd_argumentr   osgetcwdr   set_defaults)r   kwargsr   r   r   r   r   r   summaryr   r   ps               2lib/python3.13/site-packages/conda/cli/main_run.pyconfigure_parserr/      sN   !')(>9GK
	F 				
 	A aqNN  I	 ! 
'     NN!# %   NNM			   NNI   NNU   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  SSKJn  UR                  5       n	U	R                  5         U R                   (       a'  U R                   S	   S
:X  a  U R                   SS  U l        U R                   (       d  U" S5      eU" UR"                  [%        U	R&                  5      U R(                  U R*                  U R                   5      u  pU" UU" [,        R.                  R1                  5       5      U R2                  SU R4                  (       + S9nU R4                  (       dh  UR6                  (       a#  [9        UR6                  [:        R6                  SS9  UR<                  (       a#  [9        UR<                  [:        R<                  SS9  UR>                  S	:w  a=  [A        [B        5      nURE                  SSRG                  U R                   5       S35        S[,        R.                  ;  a  U" U
5        UR>                  $ [A        [B        5      nURI                  SU
 35        UR>                  $ )Nr   )context)encode_environment)
PrefixData)ArgumentError)rm_rf)subprocess_call)wrap_subprocess_callr   z--r   z6No command specified. Please provide a command to run.F)envpathraise_on_errorcapture_output )fileendz`conda run  z` failed. (See above for error)CONDA_TEST_SAVE_TEMPSz3CONDA_TEST_SAVE_TEMPS :: retaining main_run script )%base.contextr4   common.compatr5   core.prefix_datar6   
exceptionsr7   gateways.disk.deleter8   gateways.subprocessr9   utilsr:   from_contextassert_environmentr   root_prefixstrprefix_pathr   r   r(   environcopycwdno_capture_outputstdoutprintsysstderrrcr   __name__errorjoinwarning)r1   r2   r4   r5   r6   r7   r8   r9   r:   prefix_datascriptcommandresponselogs                 r.   executerb   d   s   &2-*,5,))+K""$  4 4Q 74 ?#33AB7TUU +K##$""OF rzz01XX111H !!??(//

;??(//

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

 bjj0f
 ;; !I&RS;;r0   )__doc__r(   rV   argparser   r   r   r   loggingr   r/   intrb    r0   r.   <module>rh      sM   
 
 
 L L S"3 S. Sl;) ;^ ; ;r0   