-
Notifications
You must be signed in to change notification settings - Fork 312
Open
Description
Description
discoverPlugins() in src/discovery.ts:182 uses entry.isDirectory() to filter plugin subdirectories. However, fs.Dirent.isDirectory() does not follow symbolic links -- if a plugin directory is a symlink to a real directory, isDirectory() returns false and the plugin is silently skipped.
Reproduce
# Install a plugin normally -- works
opencli plugin install github:Astro-Han/opencli-plugin-juejin
# Symlink a local plugin for development -- silently ignored
ln -s /path/to/my-plugin ~/.opencli/plugins/my-plugin
opencli my-plugin some-command
# error: unknown command 'my-plugin'Expected
Symlinked plugin directories should be discovered the same as regular directories. This is a common pattern during plugin development.
Suggested Fix
// discovery.ts:182
// Before:
if (!entry.isDirectory()) continue;
// After:
if (!entry.isDirectory() && !entry.isSymbolicLink()) continue;Optionally, follow the symlink with fs.stat() to confirm the target is actually a directory.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels