Skip to content

Commit c34d71d

Browse files
committed
VSCODE_APPDATA
1 parent f515665 commit c34d71d

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/paths.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ var os = require('os');
88
var pkg = require('../package.json');
99

1010
function getAppDataPath(platform) {
11-
const userPath = process.env['vscode_config_prefix'];
1211
switch (platform) {
13-
case 'win32': return userPath || process.env['APPDATA'] || path.join(process.env['USERPROFILE'], 'AppData', 'Roaming');
14-
case 'darwin': return userPath || path.join(os.homedir(), 'Library', 'Application Support');
15-
case 'linux': return userPath || process.env['XDG_CONFIG_HOME'] || path.join(os.homedir(), '.config');
12+
case 'win32': return process.env['VSCODE_APPDATA'] || process.env['APPDATA'] || path.join(process.env['USERPROFILE'], 'AppData', 'Roaming');
13+
case 'darwin': return process.env['VSCODE_APPDATA'] || path.join(os.homedir(), 'Library', 'Application Support');
14+
case 'linux': return process.env['VSCODE_APPDATA'] || process.env['XDG_CONFIG_HOME'] || path.join(os.homedir(), '.config');
1615
default: throw new Error('Platform not supported');
1716
}
1817
}
1918

2019
function getDefaultUserDataPath(platform) {
21-
2220
return path.join(getAppDataPath(platform), pkg.name);
2321
}
22+
2423
exports.getAppDataPath = getAppDataPath;
25-
exports.getDefaultUserDataPath = getDefaultUserDataPath;
24+
exports.getDefaultUserDataPath = getDefaultUserDataPath;

0 commit comments

Comments
 (0)