Skip to content

Commit 5434bab

Browse files
committed
fix: return false in addChannel if package is not published on npm
1 parent 4a41228 commit 5434bab

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lib/add-channel.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,6 @@ module.exports = async ({npmPublish}, pkg, context) => {
4242
npmPublish === false ? 'npmPublish' : "package.json's private property"
4343
} is ${npmPublish !== false}`
4444
);
45+
46+
return false;
4547
};

test/integration.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ test('Skip adding the package to a channel ("npmPublish" is false)', async t =>
634634
}
635635
);
636636

637-
t.falsy(result);
637+
t.false(result);
638638
await t.throws(execa('npm', ['view', pkg.name, 'version'], {cwd, env}));
639639
});
640640

@@ -662,7 +662,7 @@ test('Skip adding the package to a channel ("package.private" is true)', async t
662662
}
663663
);
664664

665-
t.falsy(result);
665+
t.false(result);
666666
await t.throws(execa('npm', ['view', pkg.name, 'version'], {cwd, env}));
667667
});
668668

0 commit comments

Comments
 (0)