Change the global config directory for Windows OS

This commit is contained in:
Mohammad Fares 2018-10-14 21:41:58 +03:00
parent 3c41d59842
commit a9be0a3d10

View File

@ -236,7 +236,13 @@ function changeYAMLValue(data, key, value) {
*/
function getGlobalDirectory() {
return di.path.join(process.env.APPDATA || process.env.HOME, '.terminalizer');
// Windows
if (typeof process.env.APPDATA != 'undefined') {
return di.path.join(process.env.APPDATA, 'terminalizer');
}
return di.path.join(process.env.HOME, '.terminalizer');
}