fix(app): more defensive, handle no git
This commit is contained in:
parent
19123b6803
commit
2ca0ae7755
1 changed files with 94 additions and 23 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue