diff --git a/src/server/server.ts b/src/server/server.ts index 9e2485a5505..14ca2ca6036 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -179,11 +179,11 @@ namespace ts.server { basePath = os.homedir(); break; case "darwin": - basePath = combinePaths(os.homedir(), "/Library/Application Support/") + basePath = combinePaths(os.homedir(), "Library/Application Support/") break; } if (basePath) { - this.cachePath = combinePaths(normalizeSlashes(basePath), "/Microsoft/TypeScript"); + this.cachePath = combinePaths(normalizeSlashes(basePath), "Microsoft/TypeScript"); } } diff --git a/src/server/typingsInstaller/typingsInstaller.ts b/src/server/typingsInstaller/typingsInstaller.ts index 09df24544c7..73735d0741b 100644 --- a/src/server/typingsInstaller/typingsInstaller.ts +++ b/src/server/typingsInstaller/typingsInstaller.ts @@ -60,7 +60,8 @@ namespace ts.server.typingsInstaller { this.runTsd(req.cachePath, typingsToInstall, installedTypings => { // TODO: record new missing package names // TODO: watch project directory - installedTypings = installedTypings.map(x => getNormalizedAbsolutePath(x, req.cachePath)); + const typingDirectory = combinePaths(req.cachePath, "typings"); + installedTypings = installedTypings.map(x => combinePaths(typingDirectory, x)); this.sendResponse(this.createResponse(req, currentlyCachedTypings.concat(installedTypings))); }); }