@@ -297,7 +297,7 @@ function createFileWatcher(
297297 )
298298 . on ( 'add' , async ( absolutePath ) => {
299299 const relativePath = OsHelpers . makePathOsAgnostic (
300- path . relative ( process . cwd ( ) , absolutePath )
300+ path . relative ( options . cwd , absolutePath )
301301 ) ;
302302
303303 Debug . log (
@@ -334,7 +334,7 @@ function createFileWatcher(
334334 } )
335335 . on ( 'change' , async ( absolutePath ) => {
336336 const relativePath = OsHelpers . makePathOsAgnostic (
337- path . relative ( process . cwd ( ) , absolutePath )
337+ path . relative ( options . cwd , absolutePath )
338338 ) ;
339339
340340 const elmFile = AppState . getFileFromMemoryCache ( relativePath ) ?? {
@@ -364,7 +364,7 @@ function createFileWatcher(
364364 } )
365365 . on ( 'unlink' , ( absolutePath ) => {
366366 const relativePath = OsHelpers . makePathOsAgnostic (
367- path . relative ( process . cwd ( ) , absolutePath )
367+ path . relative ( options . cwd , absolutePath )
368368 ) ;
369369 Debug . log (
370370 `File ${ Anonymize . path ( options , relativePath ) } has been removed` ,
@@ -401,7 +401,7 @@ function createExtraFilesWatcher(options, app, runReview, onError, request) {
401401 )
402402 . on ( 'add' , async ( absolutePath ) => {
403403 const relativePath = OsHelpers . makePathOsAgnostic (
404- path . relative ( process . cwd ( ) , absolutePath )
404+ path . relative ( options . cwd , absolutePath )
405405 ) ;
406406
407407 const newSource = await FS . readFile ( relativePath ) ;
@@ -415,7 +415,7 @@ function createExtraFilesWatcher(options, app, runReview, onError, request) {
415415 } )
416416 . on ( 'change' , async ( absolutePath ) => {
417417 const relativePath = OsHelpers . makePathOsAgnostic (
418- path . relative ( process . cwd ( ) , absolutePath )
418+ path . relative ( options . cwd , absolutePath )
419419 ) ;
420420
421421 const newSource = await FS . readFile ( relativePath ) ;
@@ -429,7 +429,7 @@ function createExtraFilesWatcher(options, app, runReview, onError, request) {
429429 } )
430430 . on ( 'unlink' , ( absolutePath ) => {
431431 const relativePath = OsHelpers . makePathOsAgnostic (
432- path . relative ( process . cwd ( ) , absolutePath )
432+ path . relative ( options . cwd , absolutePath )
433433 ) ;
434434 Debug . log (
435435 `Extra file ${ Anonymize . path ( options , relativePath ) } has been removed` ,
0 commit comments