Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
fix: add force flag to codesign to avoid already signed error (#1756)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Lando <daniel.sorridi@gmail.com>
  • Loading branch information
brianunlam and robertsLando authored Mar 6, 2023
1 parent e3ac490 commit f19285d
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 f19285d

Please sign in to comment.