Skip to content

Commit

Permalink
fix(hadron-build): use ditto instead of zip to package on MacOS COM…
Browse files Browse the repository at this point in the history
…PASS-7737 (#6315)

Use ditto instead of zip to package on MacOS
  • Loading branch information
kraenhansen authored Oct 2, 2024
1 parent 8af5d4e commit e46cc6d
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 @@ -24,8 +24,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 e46cc6d

Please sign in to comment.