Skip to content

Commit c16dc7c

Browse files
committed
fix: app name contains spaces
1 parent fcc747d commit c16dc7c

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

src/check-signature.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,13 @@ import debug from 'debug';
66
const d = debug('electron-notarize');
77

88
const codesignDisplay = async (opts: NotarizeStapleOptions) => {
9-
const result = await spawn('codesign', ['-dv', '-vvvv', '--deep', path.basename(opts.appPath)], {
10-
cwd: path.dirname(opts.appPath),
11-
});
9+
const result = await spawn('codesign', ['-dv', '-vvvv', '--deep', opts.appPath]);
1210
return result;
1311
};
1412

1513
const codesign = async (opts: NotarizeStapleOptions) => {
1614
d('attempting to check codesign of app:', opts.appPath);
17-
const result = await spawn(
18-
'codesign',
19-
['-vvv', '--deep', '--strict', path.basename(opts.appPath)],
20-
{
21-
cwd: path.dirname(opts.appPath),
22-
},
23-
);
24-
15+
const result = await spawn('codesign', ['-vvv', '--deep', '--strict', opts.appPath]);
2516
return result;
2617
};
2718
export async function checkSignatures(opts: NotarizeStapleOptions): Promise<void> {

src/notarytool.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ export async function notarizeAndWaitForNotaryTool(opts: NotaryToolStartOptions)
5959
d('zipping application to:', filePath);
6060
const zipResult = await spawn(
6161
'ditto',
62-
['-c', '-k', '--sequesterRsrc', '--keepParent', path.basename(opts.appPath), filePath],
63-
{
64-
cwd: path.dirname(opts.appPath),
65-
},
62+
['-c', '-k', '--sequesterRsrc', '--keepParent', opts.appPath, filePath],
6663
);
6764
if (zipResult.code !== 0) {
6865
throw new Error(

src/staple.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import debug from 'debug';
2-
import * as path from 'path';
32

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

98
export async function stapleApp(opts: NotarizeStapleOptions): Promise<void> {
109
d('attempting to staple app:', opts.appPath);
11-
const result = await spawn('xcrun', ['stapler', 'staple', '-v', path.basename(opts.appPath)], {
12-
cwd: path.dirname(opts.appPath),
13-
});
10+
const result = await spawn('xcrun', ['stapler', 'staple', '-v', opts.appPath]);
1411

1512
if (result.code !== 0) {
1613
throw new Error(

0 commit comments

Comments
 (0)