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

Commit

Permalink
fix: check earlier if macos.identifier is set (#35)
Browse files Browse the repository at this point in the history
* Checks earlier if macos.identifier is set

* Moves around code.
  • Loading branch information
Junkern authored and jdx committed May 16, 2018
1 parent 8b58636 commit 2e0e4eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/pack/macos.ts
Expand Up @@ -17,6 +17,8 @@ export default class PackMacos extends Command {
const {flags} = this.parse(PackMacos)
const buildConfig = await Tarballs.buildConfig(flags.root)
const {config} = buildConfig
const c = config.pjson.oclif as any
if (!c.macos || !c.macos.identifier) this.error('package.json must have oclif.macos.identifier set')
await Tarballs.build(buildConfig, {platform: 'darwin', pack: false})
const dist = buildConfig.dist(`macos/${config.bin}-v${buildConfig.version}.pkg`)
await qq.emptyDir(path.dirname(dist))
Expand All @@ -28,8 +30,6 @@ export default class PackMacos extends Command {
}
await writeScript('preinstall')
await writeScript('postinstall')
const c = config.pjson.oclif as any
if (!c.macos || !c.macos.identifier) this.error('package.json must have oclif.macos.identifier set')
const args = [
'--root', buildConfig.workspace({platform: 'darwin', arch: 'x64'}),
'--identifier', c.macos.identifier,
Expand Down

0 comments on commit 2e0e4eb

Please sign in to comment.