Skip to content

Commit

Permalink
Avoid scoped repo message for private registries (#529)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <[email protected]>
  • Loading branch information
bunysae and sindresorhus authored Apr 23, 2020
1 parent c5fd97d commit a1d96c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {htmlEscape} = require('escape-goat');
const isScoped = require('is-scoped');
const util = require('./util');
const git = require('./git-util');
const {prereleaseTags, checkIgnoreStrategy, getRegistryUrl} = require('./npm/util');
const {prereleaseTags, checkIgnoreStrategy, getRegistryUrl, isExternalRegistry} = require('./npm/util');
const version = require('./version');
const prettyVersionDiff = require('./pretty-version-diff');

Expand Down Expand Up @@ -139,7 +139,7 @@ module.exports = async (options, pkg) => {
{
type: 'confirm',
name: 'publishScoped',
when: isScoped(pkg.name) && options.availability.isAvailable && !options.availability.isUnknown && options.runPublish && (pkg.publishConfig && pkg.publishConfig.access !== 'restricted'),
when: isScoped(pkg.name) && options.availability.isAvailable && !options.availability.isUnknown && options.runPublish && (pkg.publishConfig && pkg.publishConfig.access !== 'restricted') && !isExternalRegistry(pkg),
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 a1d96c1

Please sign in to comment.