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 @@ -32,7 +32,7 @@ export const localFileChange$ = new Observable<{
32
32
. watch ( "." , { ignored } )
33
33
. on ( "all" , ( event , filename ) => {
34
34
const isNotTracked = shell . exec (
35
- " git ls-files --error-unmatch <file name>" ,
35
+ ` git ls-files --error-unmatch ${ filename } ` ,
36
36
{ silent }
37
37
) . code ;
38
38
@@ -41,14 +41,15 @@ export const localFileChange$ = new Observable<{
41
41
subscriber . next ( {
42
42
filename,
43
43
diff : fs . readFileSync ( filename ) . toString ( ) ,
44
+ isNew : true ,
44
45
} ) ;
45
46
}
46
47
} else {
47
48
// if tracked
48
49
if ( event === "change" ) {
49
50
const diff = shell . exec ( `git diff ${ filename } ` , { silent } ) ;
50
51
51
- subscriber . next ( { filename, diff, isNew : true } ) ;
52
+ subscriber . next ( { filename, diff } ) ;
52
53
}
53
54
}
54
55
} ) ;
You can’t perform that action at this time.
0 commit comments