File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ namespace ts.server {
35
35
} = require ( "os" ) ;
36
36
37
37
function getGlobalTypingsCacheLocation ( ) {
38
+ const versionMajorMinor = ts . version . match ( / \d + \. \d + / ) [ 0 ] ;
38
39
switch ( process . platform ) {
39
40
case "win32" : {
40
41
const basePath = process . env . LOCALAPPDATA ||
@@ -43,15 +44,15 @@ namespace ts.server {
43
44
process . env . USERPROFILE ||
44
45
( process . env . HOMEDRIVE && process . env . HOMEPATH && normalizeSlashes ( process . env . HOMEDRIVE + process . env . HOMEPATH ) ) ||
45
46
os . tmpdir ( ) ;
46
- return combinePaths ( normalizeSlashes ( basePath ) , "Microsoft/TypeScript" ) ;
47
+ return combinePaths ( combinePaths ( normalizeSlashes ( basePath ) , "Microsoft/TypeScript" ) , versionMajorMinor ) ;
47
48
}
48
49
case "openbsd" :
49
50
case "freebsd" :
50
51
case "darwin" :
51
52
case "linux" :
52
53
case "android" : {
53
54
const cacheLocation = getNonWindowsCacheLocation ( process . platform === "darwin" ) ;
54
- return combinePaths ( cacheLocation , "typescript" ) ;
55
+ return combinePaths ( combinePaths ( cacheLocation , "typescript" ) , versionMajorMinor ) ;
55
56
}
56
57
default :
57
58
Debug . fail ( `unsupported platform '${ process . platform } '` ) ;
You can’t perform that action at this time.
0 commit comments