diff --git a/appveyor.yml b/appveyor.yml index 01c2a549..cd5af9a6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,6 +11,6 @@ environment: install: - ps: Install-Product node $env:nodejs_version x64 - npm install -g npm@5.3.x - - appveyor-retry npm install + - npm install test_script: - npm test diff --git a/binding.js b/binding.js index 26cb8526..52db6242 100644 --- a/binding.js +++ b/binding.js @@ -70,7 +70,7 @@ module.exports.download_vips = function () { const tarFilename = ['libvips', minimumLibvipsVersion, currentPlatformId].join('-') + '.tar.gz'; // Download to per-process temporary file const tarPathTemp = path.join(os.tmpdir(), `${process.pid}-${tarFilename}`); - const tmpFile = fs.createWriteStream(tarPathTemp).on('finish', function () { + const tmpFile = fs.createWriteStream(tarPathTemp).on('close', function () { unpack(tarPathTemp, function () { // Attempt to remove temporary file try {