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

Commit f19285d

Browse files
fix: add force flag to codesign to avoid already signed error (#1756)
Co-authored-by: Daniel Lando <[email protected]>
1 parent e3ac490 commit f19285d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/mach-o.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ function patchMachOExecutable(file: Buffer) {
5959

6060
function signMachOExecutable(executable: string) {
6161
try {
62-
execFileSync('codesign', ['--sign', '-', executable], { stdio: 'inherit' });
62+
execFileSync('codesign', ['-f', '--sign', '-', executable], {
63+
stdio: 'inherit',
64+
});
6365
} catch {
6466
execFileSync('ldid', ['-Cadhoc', '-S', executable], { stdio: 'inherit' });
6567
}

0 commit comments

Comments
 (0)