@@ -129,6 +129,7 @@ function match(files, monitor, ext) {
129
129
// sort the rules by highest specificity (based on number of slashes)
130
130
// ignore rules (!) get sorted highest as they take precedent
131
131
// TODO actually check separator rules work on windows
132
+ const cwd = process . cwd ( ) ;
132
133
var rules = monitor . sort ( function ( a , b ) {
133
134
var r = b . split ( path . sep ) . length - a . split ( path . sep ) . length ;
134
135
var aIsIgnore = a . slice ( 0 , 1 ) === '!' ;
@@ -154,8 +155,13 @@ function match(files, monitor, ext) {
154
155
}
155
156
156
157
if ( s . slice ( 0 , 2 ) === '..' ) {
157
- return path . resolve ( process . cwd ( ) , s ) ;
158
+ return path . resolve ( cwd , s ) ;
158
159
}
160
+
161
+ if ( s . indexOf ( cwd ) === 0 ) {
162
+ return s ;
163
+ }
164
+
159
165
return '**' + ( prefix !== path . sep ? path . sep : '' ) + s ;
160
166
} ) ;
161
167
@@ -172,6 +178,8 @@ function match(files, monitor, ext) {
172
178
}
173
179
174
180
files . forEach ( function ( file ) {
181
+ file = path . resolve ( cwd , file ) ;
182
+
175
183
var matched = false ;
176
184
for ( var i = 0 ; i < rules . length ; i ++ ) {
177
185
if ( rules [ i ] . slice ( 0 , 1 ) === '!' ) {
@@ -205,6 +213,8 @@ function match(files, monitor, ext) {
205
213
}
206
214
matched = true ;
207
215
break ;
216
+ } else {
217
+ // utils.log.detail('no match: ' + rules[i], file);
208
218
}
209
219
}
210
220
}
0 commit comments