Electron-77 - Fixed user config path for mac

This commit is contained in:
Kiran Niranjan 2017-07-13 10:43:56 +05:30 committed by Kiran Niranjan
parent e146a95620
commit d5ac806be4

View File

@ -134,13 +134,13 @@ function setStartup(lStartup){
// Method to overwrite user config on mac installer
function updateUserConfigMac() {
return new Promise((resolve, reject) => {
let userConfigPath = process.env.HOME + '/Library/Application Support/Symphony/';
let userConfigPath = dirs.userConfig() + '/';
let globalConfigPath = process.argv[2];
let userName = process.env.USER;
childProcess.exec(`rsync -r "${globalConfigPath}" "${userConfigPath}" && chown -R "${userName}" "${userConfigPath}"`, (error, stdout) => {
if (error) {
reject(error);
childProcess.exec(`rsync -r "${globalConfigPath}" "${userConfigPath}" && chown -R "${userName}" "${userConfigPath}"`, (err) => {
if (err) {
reject(err);
}
resolve();
});