bower / decompress-zip

Module that decompresses zip files
MIT License
102 stars 76 forks source link

Decompressing on MacOS node v17.0.1 creates file that fails to execute #73

Open nsainaney opened 2 years ago

nsainaney commented 2 years ago

I have tested using the following:

import DecompressZip from 'decompress-zip'
import extract from 'extract-zip'
import path from 'path'

extract('ngrok.zip', { dir: path.resolve('~/ezip')}).then(_ => console.log('DONE'))

var unzipper = new DecompressZip('ngrok.zip')

unzipper.on('error', function (err) {
    console.log('Caught an error');
});

unzipper.on('extract', function (log) {
    console.log('Finished extracting');
});

unzipper.on('progress', function (fileIndex, fileCount) {
    console.log('Extracted file ' + (fileIndex + 1) + ' of ' + fileCount);
});

unzipper.extract();

The ngrok in ./ezip/ngrok works but the one extracted using decompress-zip fails results in:

./ngrok
[1]    52121 killed     ./ngrok

I'm on MacOS 11.6 (Big Sur)