Skip to content

Commit

Permalink
Only check for scoped repo when publish is enabled (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaodingyd authored and sindresorhus committed Jan 11, 2019
1 parent 4ffe2a7 commit f041588
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ module.exports = async (options, pkg) => {
{
type: 'confirm',
name: 'publishScoped',
when: isScoped(pkg.name) && !options.exists,
when: isScoped(pkg.name) && !options.exists && options.publish && !pkg.private,
message: `This scoped repo ${chalk.bold.magenta(pkg.name)} hasn't been published. Do you want to publish it publicly?`,
default: false
}
Expand Down

0 comments on commit f041588

Please sign in to comment.