mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-13 18:15:23 +00:00
fix(management): skip broken shared plugin entries
This commit is contained in:
1 parent
c21f589247
commit
f44b651cd6
2 files changed
+38
-1
No files matched your search
@@ -354,7 +354,19 @@ class SharedManager {
|
||||
}
|
||||
|
||||
const entryPath = path.join(sharedPluginsPath, entry.name);
|
||||
const stats = fs.statSync(entryPath);
|
||||
let stats: fs.Stats;
|
||||
try {
|
||||
stats = fs.statSync(entryPath);
|
||||
} catch (err) {
|
||||
const code = (err as NodeJS.ErrnoException).code;
|
||||
console.log(
|
||||
warn(
|
||||
`Skipping plugins/${entry.name}: unable to inspect shared plugin entry${code ? ` (${code})` : ''}`
|
||||
)
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
items.set(entry.name, {
|
||||
name: entry.name,
|
||||
type: stats.isDirectory() ? 'directory' : 'file',
|
||||
|
||||
Reference in new issue
Block a user