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

[v5] Remove workarounds for old Node.js versions #2317

Merged
merged 1 commit into from
Apr 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions lib/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,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 @@ -430,12 +426,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