o
    Vh^                     @  sh   d dl mZ d dlmZ d dlmZ erd dlmZ G dd deZ	G dd de	Z
G d	d
 d
e	ZdS )    )annotations)TYPE_CHECKING)decode)CalledProcessErrorc                   @  s   e Zd ZdS )EnvErrorN)__name__
__module____qualname__ r
   r
   o/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/poetry/utils/env/exceptions.pyr      s    r   c                         e Zd Zd fddZ  ZS )IncorrectEnvErrorenv_namestrreturnNonec                   s   d| d}t  | d S )NzEnv z  doesn't belong to this project.)super__init__)selfr   message	__class__r
   r   r      s   zIncorrectEnvError.__init__)r   r   r   r   r   r   r	   r   __classcell__r
   r
   r   r   r          r   c                      r   )EnvCommandErrorer   r   r   c                   sj   || _ d|j d|j g}|jr|dt|j  |jr*|dt|j  t d	| d S )NzCommand z( errored with the following return code zOutput:
zError output:
z

)
r   cmd
returncodeoutputappendr   stderrr   r   join)r   r   message_partsr   r
   r   r      s   zEnvCommandError.__init__)r   r   r   r   r   r
   r
   r   r   r      r   r   N)
__future__r   typingr   poetry.utils._compatr   
subprocessr   	Exceptionr   r   r   r
   r
   r
   r   <module>   s    