[Poly > Yauzl] Use execFile instead of spawn

main
Oj 2 years ago
parent c51e4c180e
commit 077815fee0

@ -1,5 +1,5 @@
// Jank replacement for yauzl by just using unzip where it expects and skipping (speed++, size--, jank++)
const { spawn } = require('child_process');
const { execFile } = require('child_process');
const { mkdirSync } = require('fs');
const { join, basename } = require('path');
@ -24,7 +24,7 @@ exports.open = async (zipPath, _options, callback) => {
mkdirSync(extractPath, { recursive: true });
const proc = spawn('unzip', ['-o', `${zipPath.replaceAll('"', '')}`, '-d', `${extractPath}`]);
const proc = execFile('unzip', ['-o', `${zipPath.replaceAll('"', '')}`, '-d', `${extractPath}`]);
log('Yauzl', 'Spawned');
proc.stderr.on('data', (data) => {

Loading…
Cancel
Save