mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-02 23:23:45 +00:00
fix(app): more defensive, handle no git
This commit is contained in:
@@ -31,7 +31,7 @@ export namespace Filesystem {
|
||||
const result = []
|
||||
while (true) {
|
||||
const search = join(current, target)
|
||||
if (await exists(search)) result.push(search)
|
||||
if (await exists(search).catch(() => false)) result.push(search)
|
||||
if (stop === current) break
|
||||
const parent = dirname(current)
|
||||
if (parent === current) break
|
||||
@@ -46,7 +46,7 @@ export namespace Filesystem {
|
||||
while (true) {
|
||||
for (const target of targets) {
|
||||
const search = join(current, target)
|
||||
if (await exists(search)) yield search
|
||||
if (await exists(search).catch(() => false)) yield search
|
||||
}
|
||||
if (stop === current) break
|
||||
const parent = dirname(current)
|
||||
|
||||
Reference in New Issue
Block a user