INNER CODE UNIT · TypeScript
isInGitRepo
hypermodeinc/modus · cli/src/commands/new/index.ts:407
async function isInGitRepo(dir: string) {
try {
await exec("git rev-parse --is-inside-work-tree", { cwd: dir });
return true;
} catch {
return false;
}
}