Skip to content
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
16 changes: 2 additions & 14 deletions lib/detect-libc.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,6 @@ const RE_GLIBC_VERSION = /GLIBC\s(\d+\.\d+)/;
*/
const MUSL = 'musl';

/**
* This string is used to find if the {@link LDD_PATH} is GLIBC
* @type {string}
*/
const GLIBC_ON_LDD = GLIBC.toUpperCase();

/**
* This string is used to find if the {@link LDD_PATH} is musl
* @type {string}
*/
const MUSL_ON_LDD = MUSL.toLowerCase();

const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-');

const familyFromReport = () => {
Expand Down Expand Up @@ -95,10 +83,10 @@ const familyFromCommand = (out) => {
};

const getFamilyFromLddContent = (content) => {
if (content.includes(MUSL_ON_LDD)) {
if (content.includes('musl')) {
return MUSL;
}
if (content.includes(GLIBC_ON_LDD)) {
if (content.includes('GLIBC')) {
return GLIBC;
}
return null;
Expand Down