Skip to content

Commit 5333848

Browse files
committed
fix(files): Fix regression where strings from the CLI files option are no-longer exploded if they enter as an array - fixes #1076
1 parent f1baae1 commit 5333848

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

lib/cli/cli-options.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ opts.makeFilesArg = function (value) {
297297
if (isList(value) && value.size) {
298298
value.forEach(function (value) {
299299
if (_.isString(value)) {
300-
globs.push(value);
300+
globs = globs.concat(
301+
opts.utils.explodeFilesArg(value)
302+
);
301303
} else {
302304
if (isMap(value)) {
303305
objs.push(value);

test/specs/cli/cli.options.files.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ describe("CLI: Options: Merging Options: Files", function () {
1313
objs: []
1414
});
1515
});
16+
it("should return the files property from Array given with strings in legacy format", function () {
17+
var imm = merge({files: ["css/*.css,*.html"]});
18+
assert.deepEqual(imm.get("files").get("core").toJS(), {
19+
globs: ["css/*.css", "*.html"],
20+
objs: []
21+
});
22+
});
1623
it("should return the files property from array given", function () {
1724
var imm = merge({files: ["css/*.css", "*.html"]});
1825
assert.deepEqual(imm.get("files").get("core").toJS(), {

0 commit comments

Comments
 (0)