summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorLeo Goetz <dev@leogtz.de>2026-05-18 16:09:01 +0200
committerLeo Goetz <dev@leogtz.de>2026-05-18 16:09:01 +0200
commit69456d49bf45e222dd0474fa9cfb420f3bdb0830 (patch)
treeb317e19d5e8226869ec17d4586c42b48ee10d04f /src/actions
parentac820e370dd4e320597b6254deefa10e01da4593 (diff)
feat: check only dirs
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/checkDependencies.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/actions/checkDependencies.ts b/src/actions/checkDependencies.ts
index 9766fa4..033a325 100644
--- a/src/actions/checkDependencies.ts
+++ b/src/actions/checkDependencies.ts
@@ -12,13 +12,16 @@ export async function checkDependencies() {
const spinner = ora("Getting all Project Data").start();
try {
- const dirs = await fs.readdir(config.path);
+ const entries = await fs.readdir(config.path, { withFileTypes: true });
- for (let dir of dirs) {
- let dirFullPath = `${config.path}${dir}`;
+ for (let entry of entries) {
+ if (!entry.isDirectory()) {
+ continue;
+ }
+ let dirFullPath = `${config.path}${entry.name}`;
const projectDir = await fs.readdir(dirFullPath);
if (projectDir.includes("package.json")) {
- projects.push(getAuditPromise(dirFullPath, dir, spinner));
+ projects.push(getAuditPromise(dirFullPath, entry.name, spinner));
}
}