When using a projectDir that's different than current directory ("."), specifying a dmg background causes an exception (Error: ENOENT: no such file or directory, lstat 'resources/osx/dmg-background.png').
Code below refers to file https://github.com/electron-userland/electron-builder/blob/master/src/targets/dmg.ts
The root cause seems to be from line 30
await copy(specification.background!, path.join(backgroundDir, backgroundFilename))
Looking at how the dmg icon resource is processed, we notice that it uses path.resolve(packager.projectDir, specification.icon) to find the resource. Maybe that should have been used?
Fix will be released in 20 minutes. Thanks for clear report.
Fixed in 7.15.2