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/lib/surface/components/__pycache__/update.cpython-312.pyc
�

��C���dZddlmZddlmZddlmZddlmZddlmZddl	m
Z
ddl	mZdd	lm
Z
dd
lmZej Gd�dej"��Zy
)z0The command to install/update gcloud components.�)�absolute_import)�division)�unicode_literals)�base)�util)�log)�
properties)�
console_io)�
OptInPrompterc�0�eZdZdZddd�Zed��Zd�Zy)�Updatez�Update all of your installed components to the latest version.

  Ensure that the latest version of all installed components is installed on the
  local workstation.
  a
          {description}

          The command lists all components it is about to update, and asks for
          confirmation before proceeding.

          By default, this command will update all components to their latest
          version. This can be configured by using the `--version` flag to
          choose a specific version to update to. This version may also be a
          version older than the one that is currently installed, thus allowing
          you to downgrade your Google Cloud CLI installation.

          You can see your current Google Cloud CLI version by running:

            $ {top_command} version

          To see the latest version of the Google Cloud CLI, run:

            $ {parent_command} list

          If you run this command without the `--version` flag and you already
          have the latest version installed, no update will be performed.
      z�
          To update all installed components to the latest version:

            $ {command}

          To update all installed components to a fixed Google Cloud CLI version
          1.2.3:

            $ {command} --version=1.2.3
      )�DESCRIPTION�EXAMPLESc��|jdd��|jddddd�	�|jd
dddd
d��y)Nz	--versionz�An optional Google Cloud CLI version to update your components to. By default, components are updated to the latest available version. By selecting an older version you can downgrade your Google Cloud CLI installation.)�help�
component_idsz
COMPONENT-IDS�*TzTHIS ARGUMENT NEEDS HELP TEXT.)�metavar�nargs�hiddenrz--compile-pythonF�True�
store_true)�requiredr�default�actionr)�add_argument)�parsers � lib/surface/components/update.py�ArgszUpdate.ArgsMsh��
��������������
-��/���������
-�
�/�c�D�tjjjj	�dvrt�j
�tj|�}|jrm|jsatjdjdj|j���dddd��}|r|j|j�yt j"j%d	�|j'|j|j�
�y)zRuns the list command.)NTz�You have specified individual components to update.  If you are trying to install new components, use:
  $ gcloud components install {components}� )�
componentsz"Do you want to run install insteadF)�message�
prompt_stringr�throw_if_unattended�cancel_on_noNz8Beginning update. This process may take several minutes.)�version)r	�VALUES�core�disable_usage_reporting�GetBoolr�Promptr�GetUpdateManagerrr(r
�PromptContinue�format�join�Installr�status�Printr
)�self�args�update_manager�installs    r�Runz
Update.Runcs��������5�5�=�=�?�<�O��o�����*�*�4�0�N����$�,�,��)�)�,�,2�F����$�"4�"4�5�-3�-7�<��#���g�
����t�1�1�2���J�J���O�P����$�,�,�d�l�l��Cr N)�__name__�
__module__�__qualname__�__doc__�
detailed_help�staticmethodrr9�r rr
r
"s3���
�.	
�1"�-�H�/��/�*Dr r
N)r=�
__future__rrr�googlecloudsdk.callioper�%googlecloudsdk.command_lib.componentsr�googlecloudsdk.corerr	�googlecloudsdk.core.consoler
�&googlecloudsdk.core.util.prompt_helperr�UniverseCompatible�
SilentCommandr
r@r r�<module>rIsT�� 7�&��'�)�6�#�*�2�@����TD�T�
�
�TD��TDr