관리-도구
편집 파일: nodejs.cpython-311.opt-1.pyc
� �EBgA � � � d dl Z d dlmZmZ d dlmZ d dlmZmZ d dl m Z mZ d dlm Z mZ d dlmZ d dlmZ G d � d e� � ZdS )� N)�Dict�Iterable)�Feature)�ExternalProgramFailed�get_passenger_package_name)�CL_SELECTOR_BIN�MODULES_LOGS_DIR)�InstallationFailedException�PackageMissingError)�WizardInstaller)�installed_interpreters_listc � � e Zd Zej � ed� � Zej Z d� Zd� Zd� Z d� Zed� � � Zed� � � Zd� Zd � Zd � ZdS )�NodejsInstallerz nodejs.logc �� � | j � d|� � | � t dddd|dg� � d S # t $ r}t � � |�d }~ww xY w)Nz,trying to set default NodeJS version as '%s'�set� --interpreter�nodejsz--default-version�--json�� app_logger�info�_run_commandr r r )�self�version�es �py/clwizard/modules/nodejs.py�_set_default_nodejs_versionz+NodejsInstaller._set_default_nodejs_version s� � �����K�W�U�U�U� 7����#��#��'���� � � � � �� %� 7� 7� 7�-�/�/�Q�6����� 7���� �!A � A� A�Ac �� � | j � d|� � | � t dddd|dg� � d S # t $ r}t � � |�d }~ww xY w)Nz(trying to set NodeJS Selector state '%s'r r r z--selector-statusr r )r �statusr s r �_set_cloudlinux_selector_statusz/NodejsInstaller._set_cloudlinux_selector_status) s� � �����G��P�P�P� 7����#��#��'���� � � � � �� %� 7� 7� 7�-�/�/�Q�6����� 7���r c �� � | j � dd� |� � � � d� |D � � } | j |� d S # t $ r}t � � |�d }~ww xY w)Nz%Trying to install NodeJS versions: %sz, c � � g | ]}d |z ��S )z alt-nodejs� )�.0r s r � <listcomp>z<NodejsInstaller._install_nodejs_versions.<locals>.<listcomp>? s � �F�F�F�'�|�g�-�F�F�F� )r r �join�_install_groupsr r )r �versions�group_namesr s r �_install_nodejs_versionsz(NodejsInstaller._install_nodejs_versions; s� � �����D�d�i�i�PX�FY�FY�Z�Z�Z�F�F�X�F�F�F�� 7� �D� �+�.�.�.�.��$� 7� 7� 7�-�/�/�Q�6����� 7���s � A � A&�A!�!A&c �j � |� d� � }|� dg � � }|r-||vr)| j � d|� � t � � �| � � � | � |� � | � d�� � |r| � |� � d S d S )N�default_versionr* zWVersion %s that was specified to be set as default must be included in install_versions�enabled)r )�getr �errorr �_install_passengerr, r! r )r �optionsr. �install_versionss r �run_installationz NodejsInstaller.run_installationE s� � �!�+�+�&7�8�8��"�;�;�z�2�6�6��� 0��6F�F�F��O�!�!�7�� � � � .�/�/�/����!�!�!��%�%�&6�7�7�7��,�,�I�,�>�>�>�� >��,�,�_�=�=�=�=�=� >� >r'