From cfd73cec816cb73e0017cf306e133a7b0e5ae4eb Mon Sep 17 00:00:00 2001 From: dave caruso Date: Sat, 3 Jun 2023 00:36:05 -0400 Subject: fixes with hardcoded modules (#3182) * fixes with hardcoded modules * add make hardcoded to make dev * adjust this message * remove debugging logs * this * restore2 --- src/js/thirdparty/detect-libc.linux.js | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/js/thirdparty/detect-libc.linux.js (limited to 'src/js/thirdparty/detect-libc.linux.js') diff --git a/src/js/thirdparty/detect-libc.linux.js b/src/js/thirdparty/detect-libc.linux.js new file mode 100644 index 000000000..4c6557247 --- /dev/null +++ b/src/js/thirdparty/detect-libc.linux.js @@ -0,0 +1,35 @@ +// Hardcoded module "detect-libc" for linux +export function family() { + return Promise.resolve(familySync()); +} + +export function familySync() { + if (process.platform === "linux") { + return GLIBC; + } else { + return null; + } +} + +export const GLIBC = "glibc"; +export const MUSL = "musl"; + +export function versionAsync() { + return Promise.resolve(version()); +} + +export function version() { + if (process.platform === "linux") { + return "2.29"; + } else { + return null; + } +} + +export function isNonGlibcLinuxSync() { + return false; +} + +export function isNonGlibcLinux() { + return Promise.resolve(isNonGlibcLinuxSync()); +} -- cgit v1.2.3