Comparing version 2.2.7 to 2.2.8
14
bin.js
@@ -15,4 +15,4 @@ #!/usr/bin/env node | ||
var ghreleases = require('ghreleases') | ||
var os = require('os') | ||
var proc = require('child_process') | ||
var mv = require('mv') | ||
var rc = require('./rc') | ||
@@ -92,3 +92,3 @@ | ||
var cache = path.join(NPM_CACHE, url.replace(/[^a-zA-Z0-9.]+/g, '-')) | ||
var tmp = path.join(os.tmpdir(), 'prebuild-' + name + '.' + process.pid + '-' + Math.random().toString(16).slice(2)) | ||
var tmp = cache + '.' + process.pid + '-' + Math.random().toString(16).slice(2) + '.tmp' | ||
var binaryName | ||
@@ -110,7 +110,13 @@ | ||
pump(req, fs.createWriteStream(tmp), function (err) { | ||
if (err) return compile() | ||
if (err) { | ||
log.warn('pump', err.message) | ||
return compile() | ||
} | ||
if (status !== 200) return fs.unlink(tmp, compile) | ||
fs.rename(tmp, cache, function (err) { | ||
if (err) return compile() | ||
if (err) { | ||
log.warn('rename', err.message) | ||
return compile() | ||
} | ||
unpack() | ||
@@ -117,0 +123,0 @@ }) |
{ | ||
"name": "prebuild", | ||
"version": "2.2.7", | ||
"version": "2.2.8", | ||
"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
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
13258
274