Skip to content

Commit b5a574f

Browse files
authored
chore(aws-cdk-lib): fix error message using deprecated 'name' property (#28275)
Instead of throwing the descriptive error, we throw: ``` ReferenceError: name is not defined ``` We meant to use `submodule.name`, not `name`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent c723ef9 commit b5a574f

File tree

1 file changed

+2
-2
lines changed
  • packages/aws-cdk-lib/scripts/submodules

1 file changed

+2
-2
lines changed

packages/aws-cdk-lib/scripts/submodules/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async function ensureSubmodule(submodule: ModuleMapEntry, modulePath: string) {
5555
if (!fs.existsSync(path.join(modulePath, '.jsiirc.json'))) {
5656
if (!submodule.definition) {
5757
throw new Error(
58-
`Cannot infer path or namespace for submodule named "${name}". Manually create ${modulePath}/.jsiirc.json file.`,
58+
`Cannot infer path or namespace for submodule named "${submodule.name}". Manually create ${modulePath}/.jsiirc.json file.`,
5959
);
6060
}
6161

@@ -74,4 +74,4 @@ async function ensureSubmodule(submodule: ModuleMapEntry, modulePath: string) {
7474
};
7575
await fs.writeJson(path.join(modulePath, '.jsiirc.json'), jsiirc, { spaces: 2 });
7676
}
77-
}
77+
}

0 commit comments

Comments
 (0)