[Poly > Yauzl] Use execFile instead of spawn
This commit is contained in:
parent
c51e4c180e
commit
077815fee0
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue