format: prettify entire project
This commit is contained in:
7
node_modules/detect-libc/lib/detect-libc.js
generated
vendored
7
node_modules/detect-libc/lib/detect-libc.js
generated
vendored
@ -10,7 +10,8 @@ const { LDD_PATH, readFile, readFileSync } = require('./filesystem');
|
||||
let cachedFamilyFilesystem;
|
||||
let cachedVersionFilesystem;
|
||||
|
||||
const command = 'getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true';
|
||||
const command =
|
||||
'getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true';
|
||||
let commandOut = '';
|
||||
|
||||
const safeCommand = () => {
|
||||
@ -158,7 +159,7 @@ const familySync = () => {
|
||||
* Resolves `true` only when the platform is Linux and the libc family is not `glibc`.
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
const isNonGlibcLinux = async () => isLinux() && await family() !== GLIBC;
|
||||
const isNonGlibcLinux = async () => isLinux() && (await family()) !== GLIBC;
|
||||
|
||||
/**
|
||||
* Returns `true` only when the platform is Linux and the libc family is not `glibc`.
|
||||
@ -263,5 +264,5 @@ module.exports = {
|
||||
isNonGlibcLinux,
|
||||
isNonGlibcLinuxSync,
|
||||
version,
|
||||
versionSync
|
||||
versionSync,
|
||||
};
|
||||
|
19
node_modules/detect-libc/lib/filesystem.js
generated
vendored
19
node_modules/detect-libc/lib/filesystem.js
generated
vendored
@ -24,18 +24,19 @@ const readFileSync = (path) => fs.readFileSync(path, 'utf-8');
|
||||
* @param {string} path
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
const readFile = (path) => new Promise((resolve, reject) => {
|
||||
fs.readFile(path, 'utf-8', (err, data) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(data);
|
||||
}
|
||||
const readFile = (path) =>
|
||||
new Promise((resolve, reject) => {
|
||||
fs.readFile(path, 'utf-8', (err, data) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
LDD_PATH,
|
||||
readFileSync,
|
||||
readFile
|
||||
readFile,
|
||||
};
|
||||
|
Reference in New Issue
Block a user