From 345eee1a3a902f812e461ca9aa9906cd84409993 Mon Sep 17 00:00:00 2001 From: Appcelerator Build Date: Fri, 18 Sep 2020 14:47:51 -0400 Subject: [PATCH] fix(ios): when building module test project, unzip via spawn to avoid max buffer error (#12100) Fixes TIMOB-28142 --- iphone/cli/commands/_buildModule.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/iphone/cli/commands/_buildModule.js b/iphone/cli/commands/_buildModule.js index f55dd3aa6eb..d2ba6e4644f 100644 --- a/iphone/cli/commands/_buildModule.js +++ b/iphone/cli/commands/_buildModule.js @@ -891,12 +891,9 @@ iOSModuleBuilder.prototype.runModule = function runModule(next) { ); // 5. unzip module to the tmp dir. Use native binary on macOS, as AdmZip doesn't support symlinks used in mac catalyst frameworks - exec(`unzip -o ${this.moduleZipPath} -d ${tmpProjectDir}`, (err, _stdout, _stderr) => { - if (err) { - return cb(err); - } - cb(); - }); + const proc = spawn('unzip', [ '-o', this.moduleZipPath, '-d', tmpProjectDir ]); + proc.once('error', err => cb(err)); + proc.on('exit', () => cb()); }, function (cb) {