Skip to content

Commit

Permalink
Skip npm name check when --no-publish is passed (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdziat authored and sindresorhus committed Jan 12, 2019
1 parent 966d08d commit 305ae9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ process.on('SIGINT', () => {

(async () => {
const pkg = util.readPkg();
const isAvailable = await npmName(pkg.name);

const isAvailable = cli.flags.publish ? await npmName(pkg.name) : false;

const options = cli.input.length > 0 ?
{
Expand Down

0 comments on commit 305ae9c

Please sign in to comment.