Skip to content

Commit

Permalink
[Bug] Fix issue #2087: Handle multiple schema files in gen-schema-vie…
Browse files Browse the repository at this point in the history
…ws script
  • Loading branch information
Gustolandia committed Nov 28, 2024
1 parent 8266204 commit 3a00cdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ async function parseConfig(): Promise<CliConfig> {
program.outputHelp();
process.exit(1);
}

return {
projectId: program.project,
bigQueryProjectId: program.bigQueryProject,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ function resolveFilePath(filePath: string): string {

function expandGlobs(globs: string[]): string[] {
let results = [];
for (var i = 0; i < globs.length; i++) {
const globResults = glob.sync(globs[i]);
// Split any comma-separated globs into individual paths
const expandedGlobs = globs.flatMap((g) => g.split(",").map((s) => s.trim()));
for (const globPath of expandedGlobs) {
const globResults = glob.sync(globPath);
results = results.concat(globResults);
}
return results;
Expand Down

0 comments on commit 3a00cdb

Please sign in to comment.