Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit 3dcc240

Browse filesBrowse files
committed
audit: Timeout audit requests eventually
1 parent 279ef3a commit 3dcc240
Copy full SHA for 3dcc240

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎lib/install.js

Copy file name to clipboardExpand all lines: lib/install.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,8 @@ Installer.prototype.printInstalled = function (cb) {
763763
})
764764
}
765765
return Bluebird.try(() => {
766-
return this.auditSubmission && this.auditSubmission.catch(() => null)
766+
if (!this.auditSubmission) return
767+
return Bluebird.resolve(this.auditSubmission).timeout(10000).catch(() => null)
767768
}).then((auditResult) => {
768769
// maybe write audit report w/ hash of pjson & shrinkwrap for later reading by `npm audit`
769770
if (npm.config.get('json')) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.