chore: fix addowner

This commit is contained in:
kangwei 2020-04-01 14:56:46 +08:00
parent 33206a3348
commit 413c440547

View File

@ -45,7 +45,7 @@ function addOwner(packageName, owner) {
} }
if (pkg) { if (pkg) {
const packageJsonFile = path.join(packages_dir, item, 'package.json'); const packageJsonFile = path.join(packages_dir, pkg, 'package.json');
if (fs.existsSync(packageJsonFile)) { if (fs.existsSync(packageJsonFile)) {
const json = require(packageJsonFile); const json = require(packageJsonFile);
@ -53,7 +53,7 @@ if (pkg) {
pkg = json.name; pkg = json.name;
} }
} }
if (owner === '*') { if (owner === '-') {
addPackageOwners(pkg); addPackageOwners(pkg);
} else { } else {
addOwner(pkg, owner); addOwner(pkg, owner);