From 5434babb96f6270603bda2023badbce1ef06ea9f Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Fri, 14 Dec 2018 18:36:17 -0500 Subject: [PATCH] fix: return `false` in `addChannel` if package is not published on npm --- lib/add-channel.js | 2 ++ test/integration.test.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/add-channel.js b/lib/add-channel.js index 4b159139..566f24b8 100644 --- a/lib/add-channel.js +++ b/lib/add-channel.js @@ -42,4 +42,6 @@ module.exports = async ({npmPublish}, pkg, context) => { npmPublish === false ? 'npmPublish' : "package.json's private property" } is ${npmPublish !== false}` ); + + return false; }; diff --git a/test/integration.test.js b/test/integration.test.js index 1ac09c09..c0fa873d 100644 --- a/test/integration.test.js +++ b/test/integration.test.js @@ -634,7 +634,7 @@ test('Skip adding the package to a channel ("npmPublish" is false)', async t => } ); - t.falsy(result); + t.false(result); await t.throws(execa('npm', ['view', pkg.name, 'version'], {cwd, env})); }); @@ -662,7 +662,7 @@ test('Skip adding the package to a channel ("package.private" is true)', async t } ); - t.falsy(result); + t.false(result); await t.throws(execa('npm', ['view', pkg.name, 'version'], {cwd, env})); });