提交 746f66a6 编写于 作者: J Joao Moreno

fallback when no APPDATA is defined

fixes #10616
上级 337688d4
......@@ -9,7 +9,7 @@ var pkg = require('../package.json');
function getAppDataPath(platform) {
switch (platform) {
case 'win32': return process.env['APPDATA'];
case 'win32': return process.env['APPDATA'] || path.join(process.env['USERPROFILE'], 'AppData', 'Roaming');
case 'darwin': return path.join(os.homedir(), 'Library', 'Application Support');
case 'linux': return process.env['XDG_CONFIG_HOME'] || path.join(os.homedir(), '.config');
default: throw new Error('Platform not supported');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册