Skip to content
This repository was archived by the owner on Apr 21, 2022. It is now read-only.

Commit 2e0e4eb

Browse files
Junkernjdx
authored andcommitted
fix: check earlier if macos.identifier is set (#35)
* Checks earlier if macos.identifier is set * Moves around code.
1 parent 8b58636 commit 2e0e4eb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/commands/pack/macos.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export default class PackMacos extends Command {
1717
const {flags} = this.parse(PackMacos)
1818
const buildConfig = await Tarballs.buildConfig(flags.root)
1919
const {config} = buildConfig
20+
const c = config.pjson.oclif as any
21+
if (!c.macos || !c.macos.identifier) this.error('package.json must have oclif.macos.identifier set')
2022
await Tarballs.build(buildConfig, {platform: 'darwin', pack: false})
2123
const dist = buildConfig.dist(`macos/${config.bin}-v${buildConfig.version}.pkg`)
2224
await qq.emptyDir(path.dirname(dist))
@@ -28,8 +30,6 @@ export default class PackMacos extends Command {
2830
}
2931
await writeScript('preinstall')
3032
await writeScript('postinstall')
31-
const c = config.pjson.oclif as any
32-
if (!c.macos || !c.macos.identifier) this.error('package.json must have oclif.macos.identifier set')
3333
const args = [
3434
'--root', buildConfig.workspace({platform: 'darwin', arch: 'x64'}),
3535
'--identifier', c.macos.identifier,

0 commit comments

Comments
 (0)