I dug into this a bit.
the specific target error comes from appdmg.js:81:53
On a run through with just one target that succeeded:
console.log("Target step started", global.target);
at the start of that shows
[REDACTED]/desktop/out/make/OurAppName.dmg for both of the builds that are happening simultaneously
I took a look at the electron code that calls into that @electron-forge/maker-dmg/src/MakerDMG.ts
output on line 21 is the one used as the target.
forgeDefaultOutPath is fine though. For example:
[REDACTED]/desktop/out/make/OurAppName-1.2.3-arm64.dmg
Pre-flight checklist
Electron Forge version
7.3.0
Electron version
N/A
Operating system
macOS 14.3
Last known working Electron Forge version
It broke in 7.0.0
Expected behavior
Expect
electron-forge make -- --arch=x64,arm64
to build both x64 and arm64 versions of the app.Actual behavior
Both x64 and arm64 make steps fail. with the error
Target already exists
node_modules/appdmg/lib/appdmg.js:81:53
Steps to reproduce
electron-forge make -- --arch=x64,arm64
Additional information
For context it'll be helpful to read through this PR that changed how makers are run. https://github.com/electron/forge/pull/3363
I dug into this a bit. the specific target error comes from
appdmg.js:81:53
On a run through with just one target that succeeded:
console.log("Target step started", global.target); at the start of that shows
[REDACTED]/desktop/out/make/OurAppName.dmg
for both of the builds that are happening simultaneouslyI took a look at the electron code that calls into that
@electron-forge/maker-dmg/src/MakerDMG.ts
output on line 21 is the one used as the target. forgeDefaultOutPath is fine though. For example:[REDACTED]/desktop/out/make/OurAppName-1.2.3-arm64.dmg
dmgConfig is
Execution goes into the conditional (
if !this.config.name
)I think this could probably be fixed by adding the targetArch to the outPath.
I plan on submitting a PR to fix this soon.