detect-libc.js 371 B

123456789101112131415161718
  1. #!/usr/bin/env node
  2. 'use strict';
  3. var spawnSync = require('child_process').spawnSync;
  4. var libc = require('../');
  5. var spawnOptions = {
  6. env: process.env,
  7. shell: true,
  8. stdio: 'inherit'
  9. };
  10. if (libc.isNonGlibcLinux) {
  11. spawnOptions.env.LIBC = process.env.LIBC || libc.family;
  12. }
  13. process.exit(spawnSync(process.argv[2], process.argv.slice(3), spawnOptions).status);