File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,20 @@ const reduceIgnore = files => {
4444 } , gitIgnore ( ) ) ;
4545} ;
4646
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+
4759const 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 ) ) ) ) ;
4961} ;
5062
5163const getFile = ( file , cwd ) => {
Original file line number Diff line number Diff line change 6161 "dir-glob" : " ^2.2.2" ,
6262 "fast-glob" : " ^2.2.6" ,
6363 "glob" : " ^7.1.3" ,
64- "ignore" : " ^4.0.3 " ,
64+ "ignore" : " ^5.1.1 " ,
6565 "pify" : " ^4.0.1" ,
6666 "slash" : " ^2.0.0"
6767 },
You can’t perform that action at this time.
0 commit comments