1
0
Fork 0
mirror of https://github.com/actions/setup-node.git synced 2024-09-19 16:06:43 +00:00

Make linter happy

This commit is contained in:
Jason Karns 2021-02-07 10:28:55 -05:00
parent 574c6daa52
commit 473cb1b506
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4F072FBC1ACA2746

View file

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