o
    Wio                     @  sh   d dl mZ d dlZd dlZd dlmZ d dlmZ d dl	m
Z
 d dl	mZ edZ	ddddZdS )    )annotationsN)install)Store)CalledProcessError)
cmd_output
pre_commitTconfig_filestrstorer   	directory
hook_typeslist[str] | Noneskip_on_missing_configboolreturnintc           	      C  s   t | ||d||d ztddd\}}}W n ty    d }Y nw tjtj| }tj|}||krEt	d t	d| d d	S )
NT)r   	overwriter   git_dirgitconfigzinit.templateDirz2`init.templateDir` not set to the target directoryz,maybe `git config --global init.templateDir z`?r   )
r   r   r   ospathrealpath
expanduserstriploggerwarning)	r   r
   r   r   r   _outconfigured_pathdest r!   X/home/ubuntu/.local/lib/python3.10/site-packages/pre_commit/commands/init_templatedir.pyinit_templatedir   s&   
r#   )T)r   r	   r
   r   r   r	   r   r   r   r   r   r   )
__future__r   loggingos.pathr   %pre_commit.commands.install_uninstallr   pre_commit.storer   pre_commit.utilr   r   	getLoggerr   r#   r!   r!   r!   r"   <module>   s    
