File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -766,6 +766,9 @@ Installer.prototype.printInstalled = function (cb) {
766766 if ( ! this . auditSubmission ) return
767767 return Bluebird . resolve ( this . auditSubmission ) . timeout ( 10000 ) . catch ( ( ) => null )
768768 } ) . then ( ( auditResult ) => {
769+ if ( auditResult && ! auditResult . metadata ) {
770+ log . warn ( 'audit' , 'Audit result from registry missing metadata. This is probably an issue with the registry.' )
771+ }
769772 // maybe write audit report w/ hash of pjson & shrinkwrap for later reading by `npm audit`
770773 if ( npm . config . get ( 'json' ) ) {
771774 return this . printInstalledForJSON ( diffs , auditResult )
@@ -834,7 +837,7 @@ Installer.prototype.printInstalledForHuman = function (diffs, auditResult) {
834837 if ( removed ) actions . push ( 'removed ' + packages ( removed ) )
835838 if ( updated ) actions . push ( 'updated ' + packages ( updated ) )
836839 if ( moved ) actions . push ( 'moved ' + packages ( moved ) )
837- if ( auditResult && auditResult . metadata . totalDependencies ) {
840+ if ( auditResult && auditResult . metadata && auditResult . metadata . totalDependencies ) {
838841 actions . push ( 'audited ' + packages ( auditResult . metadata . totalDependencies ) )
839842 }
840843 if ( actions . length === 0 ) {
You can’t perform that action at this time.
0 commit comments