We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85a0689 commit 7eb5ac9Copy full SHA for 7eb5ac9
1 file changed
packages/versioner/src/versioner.ts
@@ -162,7 +162,12 @@ const publish = async (cwd: string) => {
162
);
163
}
164
165
- const registry = (argv.registry || DEFAULT_NPM_REGISTRY).replace(/\/+$/, '');
+ const registryOverride = typeof argv.registry === 'string' ? argv.registry.trim() : null;
166
+ if (registryOverride != null && registryOverride.length === 0) {
167
+ throw new TypeError(`--registry must be a non-empty string (e.g. "${DEFAULT_NPM_REGISTRY}")`);
168
+ }
169
+
170
+ const registry = (registryOverride || DEFAULT_NPM_REGISTRY).replace(/\/+$/, '');
171
172
log.info(chalk`\n{cyan Publishing to registry}`);
173
log.info(chalk`{grey Registry:} ${registry}`);
0 commit comments