diff --git a/src/check-signature.ts b/src/check-signature.ts index 8730187..ab77858 100644 --- a/src/check-signature.ts +++ b/src/check-signature.ts @@ -6,22 +6,13 @@ import debug from 'debug'; const d = debug('electron-notarize'); const codesignDisplay = async (opts: NotarizeStapleOptions) => { - const result = await spawn('codesign', ['-dv', '-vvvv', '--deep', path.basename(opts.appPath)], { - cwd: path.dirname(opts.appPath), - }); + const result = await spawn('codesign', ['-dv', '-vvvv', '--deep', opts.appPath]); return result; }; const codesign = async (opts: NotarizeStapleOptions) => { d('attempting to check codesign of app:', opts.appPath); - const result = await spawn( - 'codesign', - ['-vvv', '--deep', '--strict', path.basename(opts.appPath)], - { - cwd: path.dirname(opts.appPath), - }, - ); - + const result = await spawn('codesign', ['-vvv', '--deep', '--strict', opts.appPath]); return result; }; export async function checkSignatures(opts: NotarizeStapleOptions): Promise { diff --git a/src/notarytool.ts b/src/notarytool.ts index 6b43431..95381f4 100644 --- a/src/notarytool.ts +++ b/src/notarytool.ts @@ -59,10 +59,7 @@ export async function notarizeAndWaitForNotaryTool(opts: NotaryToolStartOptions) d('zipping application to:', filePath); const zipResult = await spawn( 'ditto', - ['-c', '-k', '--sequesterRsrc', '--keepParent', path.basename(opts.appPath), filePath], - { - cwd: path.dirname(opts.appPath), - }, + ['-c', '-k', '--sequesterRsrc', '--keepParent', opts.appPath, filePath], ); if (zipResult.code !== 0) { throw new Error( diff --git a/src/staple.ts b/src/staple.ts index 037fba8..67e45ec 100644 --- a/src/staple.ts +++ b/src/staple.ts @@ -1,5 +1,4 @@ import debug from 'debug'; -import * as path from 'path'; import { spawn } from './spawn'; import { NotarizeStapleOptions } from './types'; @@ -8,9 +7,7 @@ const d = debug('electron-notarize:staple'); export async function stapleApp(opts: NotarizeStapleOptions): Promise { d('attempting to staple app:', opts.appPath); - const result = await spawn('xcrun', ['stapler', 'staple', '-v', path.basename(opts.appPath)], { - cwd: path.dirname(opts.appPath), - }); + const result = await spawn('xcrun', ['stapler', 'staple', '-v', opts.appPath]); if (result.code !== 0) { throw new Error(