2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-11-11 07:41:04 +00:00

Fix bug where icns conversion fails silently

This commit is contained in:
Jia Hao 2016-03-08 20:55:42 +08:00
parent c8d6cef815
commit e2d762b721

View File

@ -26,11 +26,16 @@ function pngToIcns(pngSrc, icnsDest, callback) {
} }
shell.exec(`${PNG_TO_ICNS_BIN_PATH} ${pngSrc} ${icnsDest}`, {silent: true}, (exitCode, stdOut, stdError) => { shell.exec(`${PNG_TO_ICNS_BIN_PATH} ${pngSrc} ${icnsDest}`, {silent: true}, (exitCode, stdOut, stdError) => {
if (exitCode) { if (stdOut.includes('icon.iconset:error') || exitCode) {
callback({ if (exitCode) {
stdOut: stdOut, callback({
stdError: stdError stdOut: stdOut,
}, pngSrc); stdError: stdError
}, pngSrc);
return;
}
callback(stdOut, pngSrc);
return; return;
} }