chore: dry

This commit is contained in:
2024-02-13 01:33:37 +02:00
parent 84fe3272ac
commit 1bd241cfbe

View File

@@ -168,10 +168,7 @@ export async function findConfigFile(root: string): Promise<string> {
return acc
}, [] as string[])
for (const file of allowed) {
const exists = await fs
.stat(path.resolve(root, file))
.then(() => true)
.catch(() => false)
const exists = await pathExists(path.resolve(root, file))
if (exists) {
return file
}