From 928c48c369653d3d6507f22e58d74a804cb6af86 Mon Sep 17 00:00:00 2001 From: Alisue Date: Sun, 5 Oct 2025 20:05:35 +0900 Subject: [PATCH] Ensure compatibility with Node.js 10 and 12 Continue from https://github.com/lovell/detect-libc/pull/30 --- lib/filesystem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/filesystem.js b/lib/filesystem.js index 895fe69..4c2443c 100644 --- a/lib/filesystem.js +++ b/lib/filesystem.js @@ -19,7 +19,7 @@ const readFileSync = (path) => { const fd = fs.openSync(path, 'r'); const buffer = Buffer.alloc(MAX_LENGTH); const bytesRead = fs.readSync(fd, buffer, 0, MAX_LENGTH, 0); - fs.close(fd); + fs.close(fd, () => {}); return buffer.subarray(0, bytesRead); };