Skip to content

Commit 53afca9

Browse files
author
Jeff Escalante
committed
isFileIgnored accepts absolute or relative path
1 parent e7056af commit 53afca9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,12 @@ module.exports = class SpikeUtils {
9999

100100
/**
101101
* Boolean return whether a file matches any of the configured ignores.
102-
* @param {String} file - absolute file path
102+
* @param {String} file - absolute or relative file path
103103
* @return {Boolean} whether the file is ignored or not
104104
*/
105105
isFileIgnored (file) {
106-
return micromatch.any(file, this.conf.spike.ignore)
106+
const f = new File(this.conf.context, file)
107+
return micromatch.any(f.absolute, this.conf.spike.ignore)
107108
}
108109

109110
/**

0 commit comments

Comments
 (0)