
    $TXgh                     .    d Z ddlZd ZdddZd Zd Zy)z&Entry point for all conda subcommands.    Nc                      dd l } ddlm} ddlm}m}  |        |j                  r4dD ]/  }| j                  |      j                  | j                  dz          1  ||j                         y )Nr      context)initialize_loggingset_log_level)zconda.stdout.verbosezconda.stdoutlogzconda.stderrlog
   )loggingbase.contextr   gateways.loggingr   r   json	getLoggersetLevelCRITICAL	log_level)r
   r   r   r   loggers        .lib/python3.12/site-packages/conda/cli/main.pyinit_loggersr      sY    &D ||TFf%..w/?/?"/DE U '##$    )post_parse_hookc                 L   ddl m} ddlm}m}m} |xs dg} |d      }|j                  |      \  }}	|j                  |j                  |j                  |j                  d}
|j                  |	       |j                  r|j                  j                          |j                  |	        |d
      }|j                  ||
|      }|j                  |	       t!                | r	 | ||        |||      }t#        |t$              r|S t'        |d      r|j(                  S y)zOEntrypoint for the "subshell" invocation of CLI interface. E.g. `conda create`.r   r      )do_callgenerate_parsergenerate_pre_parserz--helpF)add_help)r   debugtrace	verbosity)argparse_argsT)override_args	namespacercN)r   r   conda_argparser   r   r   parse_known_argsr   r   r   r   __init__
no_pluginsplugin_managerdisable_external_plugins
parse_argsr   
isinstanceinthasattrr#   )r   argskwargsr   r   r   r   
pre_parserpre_args_r!   parser	exit_codes                r   main_subshellr5      s    'MMH:D$e4J--d3KHa ''	M 8,779 8,d+FT(SD4(N f%f%I)S!	D	!|| 
"r   c                     | j                  ddd      } ddlm} |j                          ddlm} 	  ||       } ||      }t        |j                         d	       y
# t        $ r ddlm}  ||  d      w xY w)zPEntrypoint for the "sourced" invocation of CLI interface. E.g. `conda activate`.shell. r   r   r   )_build_activator_cls)
CondaErrorz is not a supported shell.)endr   )replacer   r   r&   activater9   KeyError
exceptionsr:   printexecute)shellr.   r/   r   r9   activator_clsr:   	activators           r   main_sourcedrE   D   s    MM(B*E '/?,U3 d#I	)


2&  ?+E7"<=>>?s   A A8c                      ddl m ddlm} | xs t        j
                  dd  } t        fd| D              } | r)| d   j                         j                  d      rt        }nt        } ||g| i |S )Nr   )ensure_text_type)conda_exception_handlerr   c              3   .   K   | ]  } |        y w)N ).0srG   s     r   	<genexpr>zmain.<locals>.<genexpr>b   s     3d!!$ds   r   r7   )common.compatrG   exception_handlerrH   sysargvtuplestrip
startswithrE   r5   )r.   r/   rH   mainrG   s       @r   rU   rU   [   sh    0; 388AB<D3d33DQ**84"49$9&99r   )__doc__rP   r   r5   rE   rU   rJ   r   r   <module>rW      s'    - 
%" *. (V.:r   