fix(cli): prevent double @ prefix when using --scope flag
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
This commit is contained in:
@@ -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-';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user