File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,20 @@ const reduceIgnore = files => {
44
44
} , gitIgnore ( ) ) ;
45
45
} ;
46
46
47
+ const ensureAbsolutePathForCwd = ( cwd , p ) => {
48
+ if ( path . isAbsolute ( p ) ) {
49
+ if ( p . startsWith ( cwd ) ) {
50
+ return p ;
51
+ }
52
+
53
+ throw new Error ( `Path ${ p } is not in cwd ${ cwd } ` ) ;
54
+ }
55
+
56
+ return path . join ( cwd , p ) ;
57
+ } ;
58
+
47
59
const getIsIgnoredPredecate = ( ignores , cwd ) => {
48
- return p => ignores . ignores ( slash ( path . relative ( cwd , p ) ) ) ;
60
+ return p => ignores . ignores ( slash ( path . relative ( cwd , ensureAbsolutePathForCwd ( cwd , p ) ) ) ) ;
49
61
} ;
50
62
51
63
const getFile = ( file , cwd ) => {
Original file line number Diff line number Diff line change 61
61
"dir-glob" : " ^2.2.2" ,
62
62
"fast-glob" : " ^2.2.6" ,
63
63
"glob" : " ^7.1.3" ,
64
- "ignore" : " ^4.0.3 " ,
64
+ "ignore" : " ^5.1.1 " ,
65
65
"pify" : " ^4.0.1" ,
66
66
"slash" : " ^2.0.0"
67
67
},
You can’t perform that action at this time.
0 commit comments