From a0730f8108070309e414fbef64257cf0f4fde2de Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 13 Oct 2026 16:35:20 -0300 Subject: [PATCH] Do not assume `process.report.getReport()` returns a report on NPM Fixes: https://github.com/sourcemeta/jsonschema/issues/896 Signed-off-by: Juan Cruz Viotti --- npm/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/npm/main.js b/npm/main.js index e292fb930..566234f0c 100644 --- a/npm/main.js +++ b/npm/main.js @@ -17,7 +17,12 @@ function isMusl() { return false; } + // Some environments, like the VS Code extension host, return no report const report = process.report.getReport(); + if (!report?.header) { + return false; + } + return report.header.glibcVersionRuntime === undefined; }