From 68e9050a62643210220d5bd14fea17a6851ff416 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 11 Sep 2024 07:33:40 -0700 Subject: [PATCH] fix: skip network requests in report.getReport() 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)) {