From 171d7d73772fbe29084e15712aa5df5030b26049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Wed, 25 Sep 2024 12:48:45 +0200 Subject: [PATCH] Use ditto instead of zip to package on MacOS --- packages/hadron-build/lib/zip.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/hadron-build/lib/zip.js b/packages/hadron-build/lib/zip.js index 6dd42d8c0b5..966c07fa669 100644 --- a/packages/hadron-build/lib/zip.js +++ b/packages/hadron-build/lib/zip.js @@ -23,8 +23,15 @@ async function zip(_opts, done) { if (opts.platform !== 'darwin') { await promisify(zipFolder)(opts.dir, opts.outPath); } else { - const args = ['-r', '--symlinks', opts.outPath, './']; - execFileSync('zip', args, { + const args = [ + '-V', // Print a line for every file copied + '-c', // Create an archive at the destination path + '-k', // PKZip archive + '--sequesterRsrc', // Preserve resource forks and HFS meta-data in the subdirectory __MACOSX + './', + opts.outPath, + ]; + execFileSync('ditto', args, { env: process.env, cwd: path.join(opts.dir, '..'), stdio: 'inherit'