Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
audit: Timeout audit requests eventually
  • Loading branch information
iarna committed May 9, 2018
1 parent 279ef3a commit 3dcc240dba5258532990534f1bd8a25d1698b0bf
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/install.js
@@ -763,7 +763,8 @@ Installer.prototype.printInstalled = function (cb) {
})
}
return Bluebird.try(() => {
return this.auditSubmission && this.auditSubmission.catch(() => null)
if (!this.auditSubmission) return
return Bluebird.resolve(this.auditSubmission).timeout(10000).catch(() => null)
}).then((auditResult) => {
// maybe write audit report w/ hash of pjson & shrinkwrap for later reading by `npm audit`
if (npm.config.get('json')) {

0 comments on commit 3dcc240

Please sign in to comment.