mirror of
https://github.com/actions/setup-node
synced 2024-12-23 05:34:56 +00:00
Make linter happy
This commit is contained in:
parent
574c6daa52
commit
473cb1b506
1 changed files with 5 additions and 2 deletions
|
@ -25,9 +25,12 @@ function writeRegistryToFile(
|
||||||
if (!scope && registryUrl.indexOf('npm.pkg.github.com') > -1) {
|
if (!scope && registryUrl.indexOf('npm.pkg.github.com') > -1) {
|
||||||
scope = github.context.repo.owner;
|
scope = github.context.repo.owner;
|
||||||
}
|
}
|
||||||
if (!scope && namePrefix = require('./package').name.match('@[^/]+')) {
|
if (!scope) {
|
||||||
|
let namePrefix = require('./package').name.match('@[^/]+');
|
||||||
|
if (namePrefix) {
|
||||||
scope = namePrefix[0];
|
scope = namePrefix[0];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (scope && scope[0] != '@') {
|
if (scope && scope[0] != '@') {
|
||||||
scope = '@' + scope;
|
scope = '@' + scope;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue