diff --git a/package.json b/package.json index 8d9153120ed..2d87139db41 100644 --- a/package.json +++ b/package.json @@ -117,8 +117,5 @@ "test/out/*" ] }, - "typings": "./out/electron-builder.d.ts", - "publishConfig": { - "tag": "next" - } + "typings": "./out/electron-builder.d.ts" } diff --git a/src/macPackager.ts b/src/macPackager.ts index 7606ddd0915..b495272cb3b 100644 --- a/src/macPackager.ts +++ b/src/macPackager.ts @@ -151,10 +151,7 @@ export default class OsXPackager extends PlatformPackager { } const emitter = require("appdmg-tf")(dmgOptions) - emitter.on("error", (e: Error) => { - console.error(e) - reject(e) - }) + emitter.on("error", reject) emitter.on("finish", () => resolve()) if (debug.enabled) { emitter.on("progress", (info: any) => { diff --git a/src/platformPackager.ts b/src/platformPackager.ts index ea953c3b2e8..fa1e30d1b91 100644 --- a/src/platformPackager.ts +++ b/src/platformPackager.ts @@ -225,7 +225,7 @@ export abstract class PlatformPackager } } else { - const outStat = await statOrNull(path.join(resourcesDir, relativeFile)) + const outStat = await statOrNull(path.join(resourcesDir, "app", relativeFile)) return outStat != null && outStat.isFile() } } diff --git a/test/src/BuildTest.ts b/test/src/BuildTest.ts index 3d3d1625189..252af639da6 100755 --- a/test/src/BuildTest.ts +++ b/test/src/BuildTest.ts @@ -64,6 +64,20 @@ test("invalid main in the app package.json (no asar)", t => t.throws(assertPack( } }), "Application entry file main.js could not be found in package. Seems like a wrong configuration.")) +test("main in the app package.json (no asar)", () => assertPack("test-app", allPlatformsAndCurrentArch(false), { + tempDirCreated: projectDir => { + return BluebirdPromise.all([ + move(path.join(projectDir, "app", "index.js"), path.join(projectDir, "app", "main.js")), + modifyPackageJson(projectDir, data => { + data.main = "main.js" + }, true), + modifyPackageJson(projectDir, data => { + data.build.asar = false + }) + ]) + } +})) + test("version from electron-prebuilt dependency", () => assertPack("test-app-one", { platform: [Platform.fromString(process.platform)], dist: false