From ec4066b768075cc84270d9ee7c0a76b011f1555a Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 11 Sep 2024 07:44:35 -0700 Subject: [PATCH] fix: skip network requests in report.getReport() (#118) It is very slow in win32 environments and we don't need that info here Closes: https://github.com/npm/npm-install-checks/issues/95 --- lib/current-env.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/current-env.js b/lib/current-env.js index f9d44f0..9babde1 100644 --- a/lib/current-env.js +++ b/lib/current-env.js @@ -19,7 +19,10 @@ function libc (osName) { return undefined } let family + const originalExclude = process.report.excludeNetwork + process.report.excludeNetwork = true const report = process.report.getReport() + process.report.excludeNetwork = originalExclude if (report.header?.glibcVersionRuntime) { family = 'glibc' } else if (Array.isArray(report.sharedObjects) && report.sharedObjects.some(isMusl)) {