Skip to content

Commit

Permalink
Remove workarounds for old Node.js versions
Browse files Browse the repository at this point in the history
  • Loading branch information
realityking authored and nschonni committed Sep 29, 2020
1 parent 40e0f00 commit 522828a
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/extensions.js
Expand Up @@ -310,10 +310,6 @@ function getBinaryPath() {
binaryPath = path.join(getBinaryDir(), getBinaryName().replace(/_(?=binding\.node)/, '/'));
}

if (process.versions.modules < 46) {
return binaryPath;
}

try {
return trueCasePathSync(binaryPath) || binaryPath;
} catch (e) {
Expand Down Expand Up @@ -434,12 +430,6 @@ function getPlatformVariant() {
try {
contents = fs.readFileSync(process.execPath);

// Buffer.indexOf was added in v1.5.0 so cast to string for old node
// Delay contents.toStrings because it's expensive
if (!contents.indexOf) {
contents = contents.toString();
}

if (contents.indexOf('libc.musl-x86_64.so.1') !== -1) {
return 'musl';
}
Expand Down

0 comments on commit 522828a

Please sign in to comment.