U
    ‡…”]ü  ã                   @   s.   d dl Zd dlZd dlZddd„Zdd„ ZdS )é    Nc                 C   s²   t jdkrtj | |¡S |dkr*tjd }| tj¡}tj 	dd¡ tj¡}tj
 | ¡\}}tj
 | ¡sª|D ]8}|D ].}tj
 ||| ¡}tj
 |¡rt|    S qtqldS | S dS )z„
    As distutils.spawn.find_executable, but on Windows, look up
    every extension declared in PATHEXT instead of just `.exe`
    Zwin32NÚPATHZPATHEXTz.exe)ÚsysÚplatformÚ	distutilsZspawnÚfind_executableÚosÚenvironÚsplitÚpathsepÚgetÚpathÚsplitextÚisfileÚjoin)Ú
executabler   ÚpathsÚ
extensionsÚbaseZextÚpÚf© r   ú:/usr/lib/python3/dist-packages/docker/credentials/utils.pyr      s    

r   c                 C   s   t j ¡ }| | pi ¡ |S )zM
    Create and return a copy of os.environ with the specified overrides
    )r   r   ÚcopyÚupdate)Z	overridesÚresultr   r   r   Úcreate_environment_dict    s    
r   )N)Zdistutils.spawnr   r   r   r   r   r   r   r   r   Ú<module>   s   
