Merge 1be67406e2 into 37e295fc02
This commit is contained in:
commit
4540629053
@ -110,7 +110,7 @@ function loadHooksFromDir(params: { dir: string; source: HookSource; pluginId?:
|
||||
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
||||
|
||||
for (const entry of entries) {
|
||||
if (!entry.isDirectory()) continue;
|
||||
if (!entry.isDirectory() && !entry.isSymbolicLink()) continue;
|
||||
|
||||
const hookDir = path.join(dir, entry.name);
|
||||
const manifest = readHookPackageManifest(hookDir);
|
||||
|
||||
@ -136,7 +136,7 @@ function discoverInDirectory(params: {
|
||||
workspaceDir: params.workspaceDir,
|
||||
});
|
||||
}
|
||||
if (!entry.isDirectory()) continue;
|
||||
if (!entry.isDirectory() && !entry.isSymbolicLink()) continue;
|
||||
|
||||
const manifest = readPackageManifest(fullPath);
|
||||
const extensions = manifest ? resolvePackageExtensions(manifest) : [];
|
||||
|
||||
@ -527,7 +527,7 @@ export async function collectPluginsTrustFindings(params: {
|
||||
|
||||
const entries = await fs.readdir(extensionsDir, { withFileTypes: true }).catch(() => []);
|
||||
const pluginDirs = entries
|
||||
.filter((e) => e.isDirectory())
|
||||
.filter((e) => e.isDirectory() || e.isSymbolicLink())
|
||||
.map((e) => e.name)
|
||||
.filter(Boolean);
|
||||
if (pluginDirs.length === 0) return findings;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user