Skip to content

Commit 8cf409b

Browse files
authored
chore: refactor by removing a couple variables (#20)
1 parent f0edbc8 commit 8cf409b

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

lib/detect-libc.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,6 @@ const RE_GLIBC_VERSION = /GLIBC\s(\d+\.\d+)/;
5656
*/
5757
const MUSL = 'musl';
5858

59-
/**
60-
* This string is used to find if the {@link LDD_PATH} is GLIBC
61-
* @type {string}
62-
*/
63-
const GLIBC_ON_LDD = GLIBC.toUpperCase();
64-
65-
/**
66-
* This string is used to find if the {@link LDD_PATH} is musl
67-
* @type {string}
68-
*/
69-
const MUSL_ON_LDD = MUSL.toLowerCase();
70-
7159
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-');
7260

7361
const familyFromReport = () => {
@@ -95,10 +83,10 @@ const familyFromCommand = (out) => {
9583
};
9684

9785
const getFamilyFromLddContent = (content) => {
98-
if (content.includes(MUSL_ON_LDD)) {
86+
if (content.includes('musl')) {
9987
return MUSL;
10088
}
101-
if (content.includes(GLIBC_ON_LDD)) {
89+
if (content.includes('GLIBC')) {
10290
return GLIBC;
10391
}
10492
return null;

0 commit comments

Comments
 (0)