File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,18 +8,17 @@ var os = require('os');
88var pkg = require ( '../package.json' ) ;
99
1010function 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
2019function getDefaultUserDataPath ( platform ) {
21-
2220 return path . join ( getAppDataPath ( platform ) , pkg . name ) ;
2321}
22+
2423exports . getAppDataPath = getAppDataPath ;
25- exports . getDefaultUserDataPath = getDefaultUserDataPath ;
24+ exports . getDefaultUserDataPath = getDefaultUserDataPath ;
You can’t perform that action at this time.
0 commit comments