summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
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));
}
}