Skip to content

Commit

Permalink
fix: return false in addChannel if package is not published on npm
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Dec 14, 2018
1 parent 4a41228 commit 5434bab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/add-channel.js
Expand Up @@ -42,4 +42,6 @@ module.exports = async ({npmPublish}, pkg, context) => {
npmPublish === false ? 'npmPublish' : "package.json's private property"
} is ${npmPublish !== false}`
);

return false;
};
4 changes: 2 additions & 2 deletions test/integration.test.js
Expand Up @@ -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}));
});

Expand Down Expand Up @@ -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}));
});

Expand Down

0 comments on commit 5434bab

Please sign in to comment.