1
0
mirror of https://github.com/lensapp/lens.git synced 2024-09-21 14:27:46 +03:00

Load symlinked extension folders (#1207)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2020-11-03 08:35:40 +02:00 committed by GitHub
parent e570f6ac3b
commit 3ed7d93e91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,8 +144,12 @@ export class ExtensionManager {
continue
}
const absPath = path.resolve(folderPath, fileName);
if (!fs.existsSync(absPath) || !fs.lstatSync(absPath).isDirectory()) { // skip non-directories
continue;
if (!fs.existsSync(absPath)) {
continue
}
const lstat = await fs.lstat(absPath)
if (!lstat.isDirectory() && !lstat.isSymbolicLink()) { // skip non-directories
continue
}
const manifestPath = path.resolve(absPath, "package.json");
const ext = await this.getExtensionByManifest(manifestPath).catch(() => null)