From 4269041a51975cc7d5e28ddfceed2ecd082e8b39 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Thu, 13 Jul 2017 11:12:20 +0530 Subject: [PATCH] Electron-77 - Added timeout for child process --- js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index ccce6eab..0e96522f 100644 --- a/js/main.js +++ b/js/main.js @@ -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); }