Merge pull request #85159 from anthonydresser/githook

Add filter to git hook (dev qol)
This commit is contained in:
João Moreno
2019-11-29 09:04:05 +01:00
committed by GitHub

View File

@@ -327,7 +327,12 @@ function hygiene(some) {
let input;
if (Array.isArray(some) || typeof some === 'string' || !some) {
input = vfs.src(some || all, { base: '.', follow: true, allowEmpty: true });
const options = { base: '.', follow: true, allowEmpty: true };
if (some) {
input = vfs.src(some, options).pipe(filter(all)); // split this up to not unnecessarily filter all a second time
} else {
input = vfs.src(all, options);
}
} else {
input = some;
}