diff --git a/src/sign.ts b/src/sign.ts index 576ac6e..a25c40b 100644 --- a/src/sign.ts +++ b/src/sign.ts @@ -72,15 +72,14 @@ async function verifySignApplication (opts: ValidatedSignOptions) { // Verify with codesign debugLog('Verifying application bundle with codesign...'); + const strictVerify = opts.strictVerify !== undefined ? opts.strictVerify : true; await execFileAsync( 'codesign', ['--verify', '--deep'].concat( - opts.strictVerify !== false && compareVersion(osRelease, '15.0.0') >= 0 // Strict flag since darwin 15.0.0 --> OS X 10.11.0 El Capitan + strictVerify !== false && compareVersion(osRelease, '15.0.0') >= 0 // Strict flag since darwin 15.0.0 --> OS X 10.11.0 El Capitan ? [ '--strict' + - (opts.strictVerify - ? '=' + opts.strictVerify // Array should be converted to a comma separated string - : '') + (strictVerify !== true ? '=' + strictVerify : '') ] : [], ['--verbose=2', opts.app] diff --git a/src/types.ts b/src/types.ts index 3c32d2b..c57bc6d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -174,10 +174,11 @@ export type OnlySignOptions = { provisioningProfile?: string; /** * Flag to enable/disable the `--strict` flag when verifying the signed application bundle. + * Also supports string values to specify which strict restrictions to use, see codesign man page for supported values. * * @defaultValue `true` */ - strictVerify?: boolean; + strictVerify?: boolean | string; /** * Type of certificate to use when signing a MAS app. * @defaultValue `"distribution"`