mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 04:46:05 +00:00
improve cli creds extraction
This commit is contained in:
@@ -72,9 +72,10 @@ export async function getConfigPath(filePath?: string) {
|
||||
}
|
||||
}
|
||||
|
||||
const paths = ["./bknd.config", "./bknd.config.ts", "./bknd.config.js"];
|
||||
const exts = ["", ".js", ".ts", ".mjs", ".cjs", ".json"];
|
||||
const paths = exts.map((e) => `bknd.config${e}`);
|
||||
for (const p of paths) {
|
||||
const _p = path.resolve(process.cwd(), p);
|
||||
const _p = path.relative(process.cwd(), p);
|
||||
if (await fileExists(_p)) {
|
||||
return _p;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user