Skip to content

Commit

Permalink
Make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkarns committed Feb 7, 2021
1 parent 20a965d commit 094c1c1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/authutil.ts
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 094c1c1

Please sign in to comment.