error handling if daemon binary not found

closes
#88
This commit is contained in:
dj2ls 2021-12-20 17:12:34 +01:00
parent cbf32e34b5
commit a1a86568d4

View file

@ -155,14 +155,20 @@ app.whenReady().then(() => {
// start daemon
// https://stackoverflow.com/a/5775120
console.log("Starting Daemon")
daemonProcess = exec('./daemon', function callback(error, stdout, stderr) {
// result
console.log(stdout)
console.log(error)
console.log(stderr)
console.log("Trying to start daemon binary")
daemonProcess = exec('./daemon', function callback(err, stdout, stderr) {
if (err) {
console.error("Can't start daemon binary");
console.error("--> this is only working with the app bundle and a precompiled binaries");
return;
}
console.log(stdout);
});
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()