UNPKG

@vuepress/plugin-git

Version:
14 lines (13 loc) 249 B
import { execaCommandSync } from 'execa'; /** * Check if the git repo is valid */ export const checkGitRepo = (cwd) => { try { execaCommandSync('git log', { cwd }); return true; } catch { return false; } };