Skip to content

Instantly share code, notes, and snippets.

@bcardarella
Created August 2, 2014 15:16
Show Gist options
  • Save bcardarella/9b53445896a862081a07 to your computer and use it in GitHub Desktop.
Save bcardarella/9b53445896a862081a07 to your computer and use it in GitHub Desktop.
diff --git a/index.js b/index.js
index 2dff6bf..e16d6a1 100644
--- a/index.js
+++ b/index.js
@@ -219,7 +219,7 @@ function multiGlob (globs, globOptions) {
throw new Error('Absolute paths not allowed (`nomount` is enabled): ' + globs[i])
}
var matches = glob.sync(globs[i], options)
- if (matches.length === 0) {
+ if (!options.allowNone && matches.length === 0) {
throw new Error('Path or pattern "' + globs[i] + '" did not match any files')
}
for (var j = 0; j < matches.length; j++) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment