[Poly > Yauzl] Fix testing error, clean code
This commit is contained in:
parent
4da7c11a04
commit
1d78f47fdc
1 changed files with 2 additions and 4 deletions
|
@ -24,12 +24,10 @@ exports.open = async (zipPath, _options, callback) => {
|
||||||
|
|
||||||
mkdirSync(extractPath, { recursive: true });
|
mkdirSync(extractPath, { recursive: true });
|
||||||
|
|
||||||
const proc = execFile('unzipp', ['-o', zipPath.replaceAll('"', ''), '-d', extractPath]);
|
const proc = execFile('unzip', ['-o', zipPath.replaceAll('"', ''), '-d', extractPath]);
|
||||||
log('Yauzl', 'Spawned');
|
log('Yauzl', 'Spawned');
|
||||||
|
|
||||||
proc.stderr.on('data', (data) => {
|
proc.stderr.on('data', errorOut);
|
||||||
errorOut(data.toString());
|
|
||||||
});
|
|
||||||
|
|
||||||
proc.on('error', (err) => {
|
proc.on('error', (err) => {
|
||||||
if (err.code === 'ENOENT') {
|
if (err.code === 'ENOENT') {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue