HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //lib/google-cloud-sdk/bin/bootstrapping/__pycache__/install.cpython-312.pyc
�

���.��8�dZddlmZddlmZddlmZddlZddlZddlZddlZddl	m
Z
ddl	mZddlm
Z
dd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZej4g�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"e#dk(re"�yy)z#Do initial setup for the Cloud CLI.�)�absolute_import)�print_function)�unicode_literalsN)�actions)�
exceptions)�config)�platforms_install)�
properties)�
console_io)�python_manager)�update_manager)�encoding)�	platforms)�gcloud_mainc	��d�}tj�}|jdd|d��|jdd|d��|jddd	�
�|jdd�
�|jddd|d��|jdd|d��|jddd��|jddd��|jddd��|jddd��|jd d!dtjt
jjjd"�d#�$�|jd%d"|d&��|jd'd(d)��|jtj�d*d�S)+zDParse args for the installer, so interactive prompts can be avoided.c�&�|j�dvS)N)�true�1)�lower)�ss �bin/bootstrapping/install.py�BoolzParseArgs.<locals>.Bool's���7�7�9�
�%�%�z--usage-reportingNz.(true/false) Enable anonymous usage reporting.)�default�type�helpz--screen-readerz'(true/false) Enable screen reader mode.z--universe-domainzhUniverse domain to default to. If specified, sets the [core/universe_domain] property installation-wide.)rrz	--rc-pathz�Profile to update with PATH and completion. If given without --command-completion or --path-update in "quiet" mode, a line will be added to this profile for both command completion and path updating.)rz--command-completionz--bash-completionz�(true/false) Add a line for command completion in the profile. In "quiet" mode, if True and you do not provide--rc-path, the default profile will be updated.z
--path-updatez�(true/false) Add a line for path updating in the profile. In "quiet" mode, if True and you do not provide --rc-path, the default profile will be updated.z--disable-installation-options�
store_truez)DEPRECATED.  This flag is no longer used.)�actionrz--override-components�*zUOverride the components that would be installed by default and install these instead.)�nargsrz--additional-components�+z�Additional components to install by default.  These components will either be added to the default install list, or to the override-components (if provided).z--update-installed-componentsz�Update previously installed components. Checks the install folder to make sure that there are no installed components that need to be updated. This is currently just used for updating gcloud via homebrew.�--quietz-qTzgDisable all interactive prompts. If input is required, defaults will be used or an error will be raised)rrrz--install-pythonz3(true/false) Attempt to install Python. MacOS only.�--no-compile-python�store_falsezEFalse. If set, skips python compilation after component installation.�)�argparse�ArgumentParser�add_argumentr�StoreConstPropertyr
�VALUES�core�disable_prompts�
parse_args�
bootstrapping�GetDecodedArgv)r�parsers  r�	ParseArgsr1$s��&��"�"�$�&�������;�	��	������4�	��	�����@�	��	���� ��	�	��������
��	��������
�	���&�
�6���
	�����/�	��	�����?�	��	���%�
��	�	�	����
��
�
'�
'�
�
�
�
 �
 �
0�
0�$�����	������@�	��	����
��	��
�	�	�=�7�7�9�!�"�=�	>�>rc�h�|��tjtjd�	�&tjtjd�}n�|�4|tj
jjjk7rd}n\tjj�j�rd}td�n"td�tjdd��}t	j tj
jj"|tj$j&�	�y)
aPDisplay prompts to opt out of usage reporting.

  Args:
    usage_reporting: bool, If True, enable usage reporting. If None, check the
      environmental variable. If None, check if its alternate release channel.
      If not, ask.
    universe_domain: str, if specified and not 'googleapis.com', set
      usage-reporting to False.
  N�%CLOUDSDK_CORE_DISABLE_USAGE_REPORTINGFTzF
    Usage reporting is always on for alternate release channels.
    a
To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. This data is
handled in accordance with our privacy policy
<https://cloud.google.com/terms/cloud-privacy-notice>. You may choose to opt in this
collection now (by choosing 'Y' at the below prompt), or at any time in the
future by running the following command:

    gcloud config set disable_usage_reporting false
z0Do you want to help improve the Google Cloud CLI)�
prompt_stringr��scope)r�GetEncodedValue�os�environr
r*r+�universe_domainrr�InstallationConfig�Load�IsAlternateReleaseChannel�printr�PromptContinue�PersistProperty�disable_usage_reporting�Scope�INSTALLATION)�usage_reportingr:s  r�PromptsrE�s	����	� � ��J�J�?�	
��	�
%�4�4�
�*�*�=���o�
�
%���!2�!2�!7�!7�!G�!G�!O�!O�O����$�$�)�)�+�E�E�G���
��		�	�
�
	�%�3�3�L����
��������4�4�/�6I����)�)�+rc��tjj�}tj|d��}|j�}t
|j��S)NF)�platform_filter�warn)r�Platform�Currentr
�
UpdateManager�GetCurrentVersionsInformation�list�keys)�platform�manager�installed_componentss   r�GetInstalledComponentsrR�sL��
�
�
�
'�
'�
)�(��(�(���N�'� �>�>�@��	
�"�'�'�)�	*�*rc��|�|ntj�}t|�}|rt�x}r|j	|�|r|j	|�t|||��|stjgd��yy)z,Do the normal installation of the Cloud CLI.N��update)r"�
componentsrM)r.�GetDefaultInstalledComponents�boolrR�extend�InstallOrUpdateComponents�_CLI�Execute)�override_components�update_installed_components�additional_components�compile_python�
to_installrUrQs       r�Installrb�s���(;�'F�#�"�@�@�B�
��
��&�"�5�7�7��7����*�+�����+�,��J��v�F�
��L�L�2�3�
rc�j�tj�}|j|�t||d��y)z�Do a forced reinstallation of Google Cloud CLI.

  Args:
    component_ids: [str], The components that should be automatically installed.
    compile_python: bool, False if we skip compile python
  TrTN)r.rWrYrZ)�
component_idsr`ras   r�	ReInstallres.���:�:�<�*����M�"��M�>�$�Grc��|s|sytd�|rdnd}dd|g}|s|jd�n|jd�tj||z�y)	ayInstalls or updates the given components.

  Args:
    component_ids: [str], The components to install or update.
    compile_python: bool, False if we skip compile python
    update: bool, True if we should run update, False to run install.  If there
      are no components to install, this does nothing unless in update mode (in
      which case everything gets updated).
  Nzi
This will install all the core command line tools necessary for working with
the Google Cloud Platform.
rU�installr"rVr#z--compile-python)r>�appendr[r\)rdr`rU�verb�execute_arg_lists     rrZrZsf��
�
�
�������$���t�4��	����1�2����.�/��,�,���&�rc��tjjjj	d�t�}|j�\tjtjjj|jtjj��|j�\tjtjjj|jtjj��tjtj �j"t$��t'j(t*j,d�}	|r&t/|j1d�|j2�yt5|j6|j�t9j:dd��tj<j>s6tA|jB|jD|jF|j2�tIjJ|jL|jN|jPt8jRt8jT�	�|jVrtYjZ�t]d
�y#t^j`$r*}t]|�tcjdd�Yd}~yd}~wwxYw)NFr5)�sdk_root�command�CLOUDSDK_REINSTALL_COMPONENTS�,�INSTALLr+)�component_id)�completion_update�path_update�rc_path�bin_pathrlzl
For more information on how to get started, please visit:
  https://cloud.google.com/sdk/docs/quickstarts

r%)3r
r*�
context_aware�use_client_certificate�Setr1�
screen_readerr@�
accessibilityrBrCr:r+r
�RestartIfUsingBundledPythonr�Pathsrl�__file__rr7r8r9re�split�no_compile_pythonrErDr.�CommandStart�INSTALLATION_CONFIG�disable_updaterrbr]r^r_r	�UpdateRC�command_completionrsrt�BIN_DIR�SDK_ROOT�install_pythonr�PromptAndInstallPythonOnMacr>r�
ToolException�sys�exit)�pargs�reinstall_components�es   r�mainr�3s�����!�!�8�8�<�<�U�C�
�+�%�
���$����z�0�0�>�>�L�L�$�2�2�%/�%5�%5�%B�%B�D����&����z�0�0�5�5�E�E�$�4�4�%/�%5�%5�%B�%B�D��,�,�f�l�l�n�6M�6M�5=�?�!�1�1��j�j�1�3�����$�*�*�3�/��1H�1H�I�
�e�#�#�U�%:�%:�;�� � ���@�
�
'�
'�
7�
7���%�%��-�-��'�'��#�#�		
�� � �!�4�4��'�'��-�-� �(�(� �)�)��
�	�	��2�2�4��
���
�	!�	!��	�!�H��H�H�Q�K�K���s�*'J�DJ�K�, K�K�__main__)$�__doc__�
__future__rrrr.r&r8r��googlecloudsdk.callioperr�googlecloudsdk.corerr	r
�googlecloudsdk.core.consoler�googlecloudsdk.core.updaterrr
�googlecloudsdk.core.utilrr�googlecloudsdkr�	CreateCLIr[r1rErRrbrerZr��__name__�rr�<module>r�s���*�&�%�'���	�
�+�.�&�1�*�2�6�6�-�.�&��{���R� ��{?�|2+�j+� 4�FH��D/�d�z���&�r