hdiutils failure on OSX El Capitan
ahallicks opened this issue · comments
When running this through an npm
script after successfully running electron-packager
I get the following output:
Creating OSX package (this may take a while)
(node:10985) DeprecationWarning: setBackground is deprecated, please use setBackgroundPath
{ Error: Error running `hdiutil`! Exit code was 1
at ChildProcess.<anonymous> (/Users/macspare/Documents/AppName/node_modules/appdmg/lib/util.js:23:17)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
exitCode: 1,
stdout: 'Preparing imaging engine…\nReading Protective Master Boot Record (MBR : 0)…\n',
stderr: '\nhdiutil: convert failed - Invalid argument\n' }
Here is the script that runs:
var objPackage = require('../package.json');
var macOptions = {
"appPath": "./out/" + objPackage.name + "-darwin-x64/" + objPackage.name + ".app",
"name": objPackage.name,
"out": "./out/installers/",
"icon": "./assets/images/logo.png"
};
console.log('Creating OSX package (this may take a while)');
var createDMG = require('electron-installer-dmg');
createDMG(macOptions, function done (err)
{
if(err){ console.log(err); } else { console.log('Successfully created package at ' + macOptions.out + macOptions.name + '.dmg'); }
});
Thanks.
Hi @ahallicks,
I don't see your configuration error at a glance, but I suspect that the hdiutil: convert failed - Invalid argument
message is due to a configuration error.
Note that this module does not invoke hdiutil
directly. That happens instead in appdmg
which this module requires. The calls to hdiutil convert
are here:
https://github.com/LinusU/node-appdmg/blob/master/lib/hdiutil.js#L5-L20
https://github.com/LinusU/node-appdmg/blob/master/lib/appdmg.js#L416