Skip globbing filenames with node-glob when the filename is not a glob (#1307)
* add a check to skip node-glob if the filename is not a glob * add a return to prevent extra globbingmaster
parent
d6e5e6be60
commit
3e5b123c37
|
@ -290,6 +290,11 @@ if (stdin) {
|
|||
|
||||
function eachFilename(patterns, callback) {
|
||||
patterns.forEach(pattern => {
|
||||
if (!glob.hasMagic(pattern)) {
|
||||
callback(pattern);
|
||||
return;
|
||||
}
|
||||
|
||||
glob(pattern, (err, filenames) => {
|
||||
if (err) {
|
||||
console.error("Unable to expand glob pattern: " + pattern + "\n" + err);
|
||||
|
|
Loading…
Reference in New Issue