()
Return the default hooks path (if it exists).
Return the default hooks path (if it exists).
Return the default hooks path ( if it exists ) .
def get_global_hook_dir_path() -> Optional[str]:
    """Return the default hooks path (if it exists)."""
    with subprocess.Popen(
        [GIT_PATH, "config", "--global", "--get", "core.hooksPath"],
        stdout=subprocess.PIPE,
    ) as process:
        if process.returncode:
            return None

        return os.path.expanduser(
            click.format_filename(process.communicate()[0].decode("utf-8")).strip()
        )
def get_global_hook_dir_path ( ) -> Optional [ str ] : with subprocess . Popen ( [ GIT_PATH , "config" , "--global" , "--get" , "core.hooksPath" ] , stdout = subprocess . PIPE , ) as process : if process . returncode : return None return os . path . expanduser ( click . format_filename ( process . communicate ( ) [ 0 ] . decode ( "utf-8" ) ) . strip ( ) )