Open mou01 opened 6 years ago
I've a similar situation there i have to check if the path is absolute. My solution has looked like this:
for (var i in dir) {
var cwd = '';
if (!path.isAbsolute(dir[i])) {
cwd = process.cwd();
}
files = files.concat(glob.sync(path.join(cwd, dir[i], pattern)));
}
But i think your code does it fix it in a smarter way.
@gakimball is there a way to get this into?
In another repo we had the same. Someone recommended path.resolve
there.
See https://github.com/foundation/style-sherpa/pull/5#issuecomment-448876455
Fixes #164