Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
audit: Timeout audit requests eventually
Browse files Browse the repository at this point in the history
  • Loading branch information
iarna committed May 9, 2018
1 parent 279ef3a commit 3dcc240
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/install.js
Expand Up @@ -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')) {
Expand Down

0 comments on commit 3dcc240

Please sign in to comment.