Improve control of installation

This commit is contained in:
ziajka
2019-01-14 14:07:42 +01:00
parent 157e3150b5
commit 6527554aa3
4 changed files with 24 additions and 20 deletions

View File

@ -59,9 +59,7 @@ ipcMain.on('installed-software-install', async function (event, software) {
message: error.message
});
}
}
}
let child;
@ -74,16 +72,17 @@ ipcMain.on('installed-software-install', async function (event, software) {
}
child.on('exit', () => {
console.log("exited");
event.sender.send(responseChannel, {
success: true
});
});
child.on('error', (err) => {
console.log(err);
event.sender.send(responseChannel, {
success: false,
message: err.message
});
});
child.stdin.end();
event.sender.send(responseChannel, {
success: true
});
});