mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Check for path existence and directory type
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
e933d171a7
commit
089f4ae99e
@ -131,6 +131,9 @@ export class ExtensionManager {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
const absPath = path.resolve(folderPath, fileName);
|
const absPath = path.resolve(folderPath, fileName);
|
||||||
|
if (!fs.existsSync(absPath) || !fs.lstatSync(absPath).isDirectory()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const manifestPath = path.resolve(absPath, "package.json");
|
const manifestPath = path.resolve(absPath, "package.json");
|
||||||
await fs.access(manifestPath, fs.constants.F_OK)
|
await fs.access(manifestPath, fs.constants.F_OK)
|
||||||
const ext = await this.getExtensionByManifest(manifestPath).catch(() => null)
|
const ext = await this.getExtensionByManifest(manifestPath).catch(() => null)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user