Skip to content

Commit

Permalink
makes output path more explicitly optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisC committed Dec 19, 2023
1 parent 85a0017 commit 0f3aca6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion scripts/add-new-bcd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ const main = async (): Promise<void> => {
{addNewFeatures: true},
bcd.browsers,
overrides,
"",
);

console.log("Injecting BCD...");
Expand Down
4 changes: 2 additions & 2 deletions scripts/update-bcd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ export const main = async (
filter: any,
browsers: Browsers,
overrides: Overrides,
outputPath: string,
outputPath?: string,
): Promise<void> => {
// Replace filter.path with a minimatch object.
if (filter.path && filter.path.includes("*")) {
Expand Down Expand Up @@ -1350,7 +1350,7 @@ export const main = async (
await fs.writeFile(file, json);
}

if (featureList.length) {
if (featureList.length && outputPath) {
const featureListJSON = JSON.stringify(featureList, null, " ") + "\n";
await fs.writeFile(outputPath, featureListJSON);
}
Expand Down

0 comments on commit 0f3aca6

Please sign in to comment.