Skip to content

Commit 17b0473

Browse files
committed
chore: additional validation and logging
1 parent 8e9f3f0 commit 17b0473

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/flat.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ async function validateFlatOpts (opts: FlatOptions): Promise<ValidatedFlatOption
3939
install = '/Applications';
4040
}
4141

42+
if (typeof opts.scripts === 'string' && opts.platform === 'mas') {
43+
debugWarn('Mac App Store packages cannot have `scripts`, ignoring option.');
44+
}
45+
4246
return {
4347
...opts,
4448
pkg,
@@ -114,7 +118,10 @@ export async function buildPkg (_opts: FlatOptions) {
114118
debugLog(
115119
'Finding `3rd Party Mac Developer Installer` certificate for flattening app distribution in the Mac App Store...'
116120
);
117-
identities = await findIdentities(validatedOptions.keychain || null, '3rd Party Mac Developer Installer:');
121+
identities = await findIdentities(
122+
validatedOptions.keychain || null,
123+
'3rd Party Mac Developer Installer:'
124+
);
118125
} else {
119126
debugLog(
120127
'Finding `Developer ID Application` certificate for distribution outside the Mac App Store...'

src/types.ts

+2
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ type OnlyFlatOptions = {
220220
* Path to a directory containing `preinstall.sh` or `postinstall.sh` scripts.
221221
* These must be executable and will run on pre/postinstall depending on the file
222222
* name.
223+
*
224+
* This option is only valid if {@link FlatOptions.platform} is set to `darwin`.
223225
*/
224226
scripts?: string;
225227
};

0 commit comments

Comments
 (0)