File tree Expand file tree Collapse file tree 2 files changed +1
-1
lines changed Expand file tree Collapse file tree 2 files changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const ownPkg = require('../package.json');
1010const getLog = require ( './lib/log' ) ;
1111
1212const pkg = JSON . parse ( readFileSync ( './package.json' ) ) ;
13+ if ( pkg . name === undefined ) throw new Error ( `"name" key is missing from your package.json` ) ;
1314
1415require ( 'update-notifier' ) ( {
1516 pkg : _ . defaults ( ownPkg , { version : '0.0.0' } ) ,
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ async function validateToken(otp, npm) {
5757
5858function getRegistry ( pkg , conf ) {
5959 if ( pkg . publishConfig && pkg . publishConfig . registry ) return pkg . publishConfig . registry ;
60-
6160 if ( pkg . name [ 0 ] !== '@' ) return conf . get ( 'registry' ) || DEFAULT_REGISTRY ;
6261
6362 const [ scope ] = pkg . name . split ( '/' ) ;
You can’t perform that action at this time.
0 commit comments