Skip to content

Commit 099af4b

Browse files
authored
fix(bazel/api-golden): ensure golden directory exists (#2664)
This makes it much easier to generate the initial golden directory, as we don't have to manually create all of them, for every entry-point.
1 parent 335a273 commit 099af4b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bazel/api-golden/index_npm_packages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ async function main(
7070
// Keep track of outdated goldens.
7171
if (actual !== expected) {
7272
if (approveGolden) {
73+
fs.mkdirSync(path.dirname(goldenFilePath), {recursive: true});
7374
fs.writeFileSync(goldenFilePath, actual, 'utf8');
7475
} else {
7576
outdatedGoldens.push(goldenName);

0 commit comments

Comments
 (0)