Skip to content

Commit

Permalink
fix(cli): Fix plugin path detection when only 1 plugin exists
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed May 8, 2024
1 parent e83dfc6 commit 4f31067
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/cli/src/commands/add/plugin/create-new-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ function findExistingPluginsDir(project: Project): { prefix: string; suffix: str
if (pluginClasses.length === 0) {
return;
}
if (pluginClasses.length === 1) {
return { prefix: path.dirname(pluginClasses[0].getSourceFile().getDirectoryPath()), suffix: '' };
}
const pluginDirs = pluginClasses.map(c => {
return c.getSourceFile().getDirectoryPath();
});
Expand Down

0 comments on commit 4f31067

Please sign in to comment.