Skip to content

Commit 7338e7a

Browse files
committed
fix: when scope is provided use proper separator
it's not documented particularly well but ":" needs to be set between the scope and "registry" in order to set the proper .npmrc config https://docs.npmjs.com/files/npmrc#comments this demonstrates it well although the link is for a different topic this was incorrectly fixed in verdaccio#34
1 parent e037799 commit 7338e7a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/cli-utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export const copyToClipBoardUtility = (str: string): ((e: SyntheticEvent<HTMLEle
2121
};
2222

2323
export function getCLISetConfigRegistry(command: string, scope: string, registryUrl: string): string {
24-
return `${command} ${scope}registry ${registryUrl}`;
24+
// if there is a scope defined there needs to be a ":" separator between the scope and the registry
25+
return `${command} ${scope}${scope !== '' ? ':' : ''}registry ${registryUrl}`;
2526
}
2627

2728
export function getCLISetRegistry(command: string, registryUrl: string): string {

0 commit comments

Comments
 (0)