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

Add a warning about the macOS mandatory code signing requirement #1176

Merged
merged 2 commits into from
May 12, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,14 @@ export async function exec(argv2: string[]) {
// sign executable ad-hoc to workaround the new mandatory signing requirement
// users can always replace the signature if necessary
execSync(`codesign --sign - ${target.output}`);
} else if (target.arch === 'arm64') {
log.warn('Unable to sign the macOS executable on non-macOS host', [
'Due to the mandatory code signing requirement, before the',
'executable is distributed to end users, it must be signed with',
'the "codesign" utility of macOS, otherwise, it will be immediately',
'killed by kernel on launch. An ad-hoc signature is sufficient.',
'To do that, "codesign --sign - <executable>" on a Mac.',
]);
}
}

Expand Down