Skip to content
Open
Show file tree
Hide file tree
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
13 changes: 2 additions & 11 deletions src/check-signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
Expand Down
5 changes: 1 addition & 4 deletions src/notarytool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 1 addition & 4 deletions src/staple.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import debug from 'debug';
import * as path from 'path';

import { spawn } from './spawn';
import { NotarizeStapleOptions } from './types';
Expand All @@ -8,9 +7,7 @@ const d = debug('electron-notarize:staple');

export async function stapleApp(opts: NotarizeStapleOptions): Promise<void> {
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(
Expand Down