File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ namespace ts.server {
3535 } = require ( "os" ) ;
3636
3737 function getGlobalTypingsCacheLocation ( ) {
38+ const versionMajorMinor = ts . version . match ( / \d + \. \d + / ) [ 0 ] ;
3839 switch ( process . platform ) {
3940 case "win32" : {
4041 const basePath = process . env . LOCALAPPDATA ||
@@ -43,15 +44,15 @@ namespace ts.server {
4344 process . env . USERPROFILE ||
4445 ( process . env . HOMEDRIVE && process . env . HOMEPATH && normalizeSlashes ( process . env . HOMEDRIVE + process . env . HOMEPATH ) ) ||
4546 os . tmpdir ( ) ;
46- return combinePaths ( normalizeSlashes ( basePath ) , "Microsoft/TypeScript" ) ;
47+ return combinePaths ( combinePaths ( normalizeSlashes ( basePath ) , "Microsoft/TypeScript" ) , versionMajorMinor ) ;
4748 }
4849 case "openbsd" :
4950 case "freebsd" :
5051 case "darwin" :
5152 case "linux" :
5253 case "android" : {
5354 const cacheLocation = getNonWindowsCacheLocation ( process . platform === "darwin" ) ;
54- return combinePaths ( cacheLocation , "typescript" ) ;
55+ return combinePaths ( combinePaths ( cacheLocation , "typescript" ) , versionMajorMinor ) ;
5556 }
5657 default :
5758 Debug . fail ( `unsupported platform '${ process . platform } '` ) ;
You can’t perform that action at this time.
0 commit comments