This commit is contained in:
Jason Karns 2024-03-14 11:13:01 -05:00 committed by GitHub
commit 6452c12d1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,6 +25,12 @@ function writeRegistryToFile(
if (!scope && registryUrl.indexOf('npm.pkg.github.com') > -1) {
scope = github.context.repo.owner;
}
if (!scope) {
let namePrefix = require('./package').name.match('@[^/]+');
if (namePrefix) {
scope = namePrefix[0];
}
}
if (scope && scope[0] != '@') {
scope = '@' + scope;
}