Comparing version 2.0.2 to 2.0.3
15
bin.js
@@ -89,2 +89,3 @@ #!/usr/bin/env node | ||
var tmp = path.join(os.tmpdir(), 'prebuild-' + name + '.' + process.pid + '-' + Math.random().toString(16).slice(2)) | ||
var binaryName | ||
@@ -116,5 +117,17 @@ fs.exists(cache, function (exists) { | ||
function updateName (entry) { | ||
if (/\.node$/i.test(entry.name)) binaryName = entry.name | ||
} | ||
function unpack () { | ||
pump(fs.createReadStream(cache), zlib.createGunzip(), tfs.extract('.'), function (err) { | ||
pump(fs.createReadStream(cache), zlib.createGunzip(), tfs.extract('.').on('entry', updateName), function (err) { | ||
if (err) return compile() | ||
if (binaryName) { | ||
try { | ||
require(path.resolve(binaryName)) | ||
} catch (err) { | ||
log.info('install', 'Could not load binary module') | ||
return compile() | ||
} | ||
} | ||
log.info('install', 'Prebuild successfully installed!') | ||
@@ -121,0 +134,0 @@ }) |
{ | ||
"name": "prebuild", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "A command line tool for easily doing prebuilds for multiple version of node/iojs on a specific platform", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12118
248
7