From 077815fee0c69d345f7f0ea6dd2bf9efbcce2f55 Mon Sep 17 00:00:00 2001 From: Oj Date: Tue, 25 Jan 2022 22:21:47 +0000 Subject: [PATCH] [Poly > Yauzl] Use execFile instead of spawn --- polyfills/yauzl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polyfills/yauzl.js b/polyfills/yauzl.js index ce4e70b..657ccbc 100644 --- a/polyfills/yauzl.js +++ b/polyfills/yauzl.js @@ -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) => {