Skip to content

Commit

Permalink
fix: add force flag to codesign to avoid already signed error (vercel…
Browse files Browse the repository at this point in the history
…#1756)

Co-authored-by: Daniel Lando <daniel.sorridi@gmail.com>
  • Loading branch information
2 people authored and pcnate committed Aug 15, 2023
1 parent cb44138 commit e264f65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/mach-o.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ function patchMachOExecutable(file: Buffer) {

function signMachOExecutable(executable: string) {
try {
execFileSync('codesign', ['--sign', '-', executable], { stdio: 'inherit' });
execFileSync('codesign', ['-f', '--sign', '-', executable], {
stdio: 'inherit',
});
} catch {
execFileSync('ldid', ['-Cadhoc', '-S', executable], { stdio: 'inherit' });
}
Expand Down

0 comments on commit e264f65

Please sign in to comment.