diff --git a/packages/cli/src/modules/new/commands/new.ts b/packages/cli/src/modules/new/commands/new.ts index 9d09f42cf3..a38316dd62 100644 --- a/packages/cli/src/modules/new/commands/new.ts +++ b/packages/cli/src/modules/new/commands/new.ts @@ -42,7 +42,10 @@ export default async (opts: ArgOptions) => { let pluginInfix: string | undefined = undefined; let packagePrefix: string | undefined = undefined; if (scope) { - packagePrefix = scope.includes('/') ? `@${scope}` : `@${scope}/`; + const normalizedScope = scope.startsWith('@') ? scope : `@${scope}`; + packagePrefix = normalizedScope.includes('/') + ? normalizedScope + : `${normalizedScope}/`; pluginInfix = scope.includes('backstage') ? 'plugin-' : 'backstage-plugin-'; }