fix(app): more defensive, handle no git

This commit is contained in:
Adam
2026-01-05 15:11:55 -06:00
parent 19123b6803
commit 2ca0ae7755
7 changed files with 94 additions and 23 deletions

View File

@@ -85,6 +85,7 @@ export namespace FileWatcher {
.cwd(Instance.worktree)
.text()
.then((x) => path.resolve(Instance.worktree, x.trim()))
.catch(() => undefined)
if (vcsDir && !cfgIgnores.includes(".git") && !cfgIgnores.includes(vcsDir)) {
const gitDirContents = await readdir(vcsDir).catch(() => [])
const ignoreList = gitDirContents.filter((entry) => entry !== "HEAD")