Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 522828a

Browse files
realitykingnschonni
authored andcommitted
Remove workarounds for old Node.js versions
1 parent 40e0f00 commit 522828a

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

lib/extensions.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,6 @@ function getBinaryPath() {
310310
binaryPath = path.join(getBinaryDir(), getBinaryName().replace(/_(?=binding\.node)/, '/'));
311311
}
312312

313-
if (process.versions.modules < 46) {
314-
return binaryPath;
315-
}
316-
317313
try {
318314
return trueCasePathSync(binaryPath) || binaryPath;
319315
} catch (e) {
@@ -434,12 +430,6 @@ function getPlatformVariant() {
434430
try {
435431
contents = fs.readFileSync(process.execPath);
436432

437-
// Buffer.indexOf was added in v1.5.0 so cast to string for old node
438-
// Delay contents.toStrings because it's expensive
439-
if (!contents.indexOf) {
440-
contents = contents.toString();
441-
}
442-
443433
if (contents.indexOf('libc.musl-x86_64.so.1') !== -1) {
444434
return 'musl';
445435
}

0 commit comments

Comments
 (0)