@@ -134,7 +134,7 @@ namespace ts.server.typingsInstaller {
134134 this . sendResponse ( this . createSetTypings ( req , discoverTypingsResult . cachedTypingPaths ) ) ;
135135
136136 // start watching files
137- this . watchFiles ( req . projectRootPath , discoverTypingsResult . filesToWatch ) ;
137+ this . watchFiles ( req . projectName , discoverTypingsResult . filesToWatch ) ;
138138
139139 // install typings
140140 this . installTypings ( req , req . cachePath || this . globalCachePath , discoverTypingsResult . cachedTypingPaths , discoverTypingsResult . newTypingNames ) ;
@@ -255,20 +255,18 @@ namespace ts.server.typingsInstaller {
255255 }
256256 }
257257
258- private watchFiles ( projectRootPath : string , files : string [ ] ) {
258+ private watchFiles ( projectName : string , files : string [ ] ) {
259259 if ( ! files . length ) {
260260 return ;
261261 }
262262 const watchers : FileWatcher [ ] = [ ] ;
263263 for ( const file of files ) {
264264 const w = this . installTypingHost . watchFile ( file , f => {
265265 if ( this . log . isEnabled ( ) ) {
266- this . log . writeLine ( `FS notification for '${ f } ', sending 'clean' message for project '${ projectRootPath } '` ) ;
266+ this . log . writeLine ( `FS notification for '${ f } ', sending 'clean' message for project '${ projectName } '` ) ;
267267 }
268- if ( ! this . closeWatchers ( projectRootPath ) ) {
269- return ;
270- }
271- this . sendResponse ( < InvalidateCachedTypings > { projectName : projectRootPath , kind : "invalidate" } )
268+ this . closeWatchers ( projectName ) ;
269+ this . sendResponse ( < InvalidateCachedTypings > { projectName : projectName , kind : "invalidate" } )
272270 } ) ;
273271 watchers . push ( w ) ;
274272 }
0 commit comments