fix: set repository authentication when repositoryUrl is set as an option
This commit is contained in:
+3
-3
@@ -42,17 +42,17 @@ module.exports = async (opts, logger) => {
|
||||
};
|
||||
}
|
||||
|
||||
const repositoryUrl = (await pkgRepoUrl()) || (await repoUrl());
|
||||
|
||||
// Set default options values if not defined yet
|
||||
options = {
|
||||
branch: 'master',
|
||||
repositoryUrl: repositoryUrl ? getGitAuthUrl(repositoryUrl) : repositoryUrl,
|
||||
repositoryUrl: (await pkgRepoUrl()) || (await repoUrl()),
|
||||
tagFormat: `v\${version}`,
|
||||
// Remove `null` and `undefined` options so they can be replaced with default ones
|
||||
...pickBy(options, option => !isUndefined(option) && !isNull(option)),
|
||||
};
|
||||
|
||||
options.repositoryUrl = options.repositoryUrl ? getGitAuthUrl(options.repositoryUrl) : options.repositoryUrl;
|
||||
|
||||
debug('options values: %O', options);
|
||||
|
||||
return {options, plugins: await plugins(options, pluginsPath, logger)};
|
||||
|
||||
Reference in New Issue
Block a user