Electron-77 - Added timeout for child process

This commit is contained in:
Kiran Niranjan 2017-07-13 11:12:20 +05:30 committed by Kiran Niranjan
parent b05bbd5aa7
commit 4269041a51

View File

@ -138,7 +138,7 @@ function updateUserConfigMac() {
let globalConfigPath = process.argv[2];
let userName = process.env.USER;
childProcess.exec(`rsync -r "${globalConfigPath}" "${userConfigPath}" && chown -R "${userName}" "${userConfigPath}"`, (err) => {
childProcess.exec(`rsync -r "${globalConfigPath}" "${userConfigPath}" && chown -R "${userName}" "${userConfigPath}"`, {timeout: 60000}, (err) => {
if (err) {
reject(err);
}
@ -153,7 +153,7 @@ function updateUserConfigWin() {
let userConfigPath = app.getPath('userData');
let globalConfigPath = path.join(__dirname, '..', '..', '..', 'config/Symphony.config');
childProcess.exec(`echo D|xcopy /y /e /s /c "${globalConfigPath}" "${userConfigPath}"`, (err) => {
childProcess.exec(`echo D|xcopy /y /e /s /c "${globalConfigPath}" "${userConfigPath}"`, {timeout: 60000}, (err) => {
if (err) {
reject(err);
}