Wait for chmod completion

This commit is contained in:
Scott E. Graves
2019-04-07 00:11:26 -05:00
parent e647cf15d2
commit 73fc72acb7

View File

@@ -524,11 +524,23 @@ ipcMain.on(Constants.IPC_Extract_Release, (event, data) => {
.on('finish', () => {
stream.close();
if (os.platform() !== 'win32') {
helpers.executeAndWait("chmod +x \"" + path.join(destination, 'repertory') + "\"");
helpers
.executeAndWait("chmod +x \"" + path.join(destination, 'repertory') + "\"")
.then(() => {
standardIPCReply(event, Constants.IPC_Extract_Release_Complete, {
Source: data.Source,
});
})
.catch(error => {
standardIPCReply(event, Constants.IPC_Extract_Release_Complete, {
Source: data.Source,
}, error);
})
} else {
standardIPCReply(event, Constants.IPC_Extract_Release_Complete, {
Source: data.Source,
});
}
standardIPCReply(event, Constants.IPC_Extract_Release_Complete, {
Source: data.Source,
});
});
});