Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

detect-libc

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detect-libc - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

9

bin/detect-libc.js

@@ -8,7 +8,12 @@ #!/usr/bin/env node

const spawnOptions = { stdio: 'inherit', env: process.env };
const spawnOptions = {
env: process.env,
shell: true,
stdio: 'inherit'
};
if (family) {
spawnOptions.env.LIBC = family;
spawnOptions.env.LIBC = process.env.LIBC || family;
}
process.exit(spawnSync(process.argv[2], process.argv.slice(3), spawnOptions).status);

@@ -6,3 +6,6 @@ 'use strict';

const spawnOptions = { encoding: 'utf8' };
const spawnOptions = {
encoding: 'utf8',
env: process.env
};

@@ -28,9 +31,2 @@ let family = '';

}
} else if (platform === 'darwin') {
// Try otool
const otool = spawnSync('otool', ['-L', '/usr/lib/libc.dylib'], spawnOptions);
if (otool.status === 0) {
family = 'bsd';
version = otool.stdout.split(/[\r\n]+/)[1].trim().split(/\s/)[6].replace(')', '');
}
}

@@ -37,0 +33,0 @@

{
"name": "detect-libc",
"version": "0.0.5",
"version": "0.0.6",
"description": "Node.js module to detect the C standard library (libc) implementation family and version",

@@ -5,0 +5,0 @@ "main": "lib/detect-libc.js",

# detect-libc
Node.js module to detect the C standard library (libc) implementation
family and version in use on a given system.
family and version in use on a given Linux system.
Provides a value suitable for use with the `libc` option of
Provides a value suitable for use with the `LIBC` option of
[prebuild](https://www.npmjs.com/package/prebuild),

@@ -13,3 +13,3 @@ [prebuild-ci](https://www.npmjs.com/package/prebuild-ci) and

Currently supports libc detection on Linux (glibc, musl) and OS X (bsd).
Currently supports libc detection of `glibc` and `musl`.

@@ -26,4 +26,5 @@ ## Install

Command line tool that spawns the child `command` with the `LIBC`
environment variable set to the value of the system libc family.
Command line tool that spawns the child `command`.
When run on a Linux platform the `LIBC` environment variable
will be set to the value of the system libc family.

@@ -47,3 +48,3 @@ ### API

"dependencies": {
"detect-libc": "^0.0.5",
"detect-libc": "^0.0.6",
"prebuild-install": "^2.1.2"

@@ -50,0 +51,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc