-
Notifications
You must be signed in to change notification settings - Fork 320
Open
Description
To anyone interested, this ensures tries to keep behavior as close as possible, yet still use node-glob 10:
--- a/cli/index.js
+++ b/cli/index.js
@@ -215,11 +215,11 @@
var ignoredGlobPatterns = paths
.filter(function (path) { return path[0] == '!'; })
.map(function (path) { return path.substring(1); });
-
return globPatterns.reduce(function (accumulator, path) {
var expandedWithSource =
- glob.sync(path, { ignore: ignoredGlobPatterns, nodir: true, nonull: true })
- .map(function (expandedPath) { return { expanded: expandedPath, source: path }; });
+ glob.sync(path, { ignore: ignoredGlobPatterns, nodir: true, dotRelative: true });
+ if (expandedWithSource.length == 0) expandedWithSource.push(path);
+ expandedWithSource = expandedWithSource.map(function (expandedPath) { return { expanded: expandedPath, source: path }; });
return accumulator.concat(expandedWithSource);
}, []);
The "cli/test/binary-test.js" batch processing with wildcard and exclude paths test seems to be using a deprecated feature of node glob (! with slash in pattern), so there's no simple workaround for that test.
Metadata
Metadata
Assignees
Labels
No labels