Skip to content

Commit

Permalink
Release: 1.14.6
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Action committed Aug 21, 2022
1 parent ca6dca7 commit c098626
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion js/lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ nopt.typeDefs.brace_style = {
return true;
}
};
nopt.typeDefs.glob = {
type: "glob",
validate: function(data, key, val) {
if (typeof val === 'string' && glob.hasMagic(val)) {
// Preserve value if it contains glob magic
data[key] = val;
return true;
} else {
// Otherwise validate it as regular path
return nopt.typeDefs.path.validate(data, key, val);
}
}
};
var path = require('path'),
editorconfig = require('editorconfig'),
knownOpts = {
Expand Down Expand Up @@ -112,7 +125,7 @@ var path = require('path'),
// CLI
"version": Boolean,
"help": Boolean,
"files": [path, Array],
"files": ["glob", Array],
"outfile": path,
"replace": Boolean,
"quiet": Boolean,
Expand Down

0 comments on commit c098626

Please sign in to comment.