Skip to content

Commit

Permalink
Use ditto instead of zip to package on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
kraenhansen committed Sep 30, 2024
1 parent 7265f88 commit 171d7d7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/hadron-build/lib/zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 171d7d7

Please sign in to comment.