Skip to content

Commit

Permalink
fix: Crash: app-update.yml not found when using --prepackaged
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Jan 11, 2017
1 parent f07b2d8 commit ba474be
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/electron-builder/src/macPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ export default class MacPackager extends PlatformPackager<MacOptions> {
let nonMasPromise: Promise<any> | null = null

const hasMas = targets.length !== 0 && targets.some(it => it.name === "mas")
const prepackaged = this.packagerOptions.prepackaged

if (!hasMas || targets.length > 1) {
if (prepackaged == null && (!hasMas || targets.length > 1)) {
const appOutDir = this.computeAppOutDir(outDir, arch)
nonMasPromise = this.doPack(outDir, appOutDir, this.platform.nodeName, arch, this.platformSpecificBuildOptions)
.then(() => this.writeUpdateInfo(appOutDir, outDir, targets))
Expand All @@ -87,9 +88,11 @@ export default class MacPackager extends PlatformPackager<MacOptions> {
}

if (hasMas) {
const appOutDir = path.join(outDir, "mas")
const appOutDir = prepackaged || path.join(outDir, "mas")
const masBuildOptions = deepAssign({}, this.platformSpecificBuildOptions, (<any>this.config).mas)
await this.doPack(outDir, appOutDir, "mas", arch, masBuildOptions)
if (prepackaged == null) {
await this.doPack(outDir, appOutDir, "mas", arch, masBuildOptions)
}
await this.sign(appOutDir, masBuildOptions)
}

Expand Down

0 comments on commit ba474be

Please sign in to comment.