Skip to content

Commit 61671c1

Browse files
fix: improve no stacks found message in synth output
1 parent 73ee028 commit 61671c1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/cdktf-cli/src/bin/cmds/ui/synth.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ type SynthOutputConfig = {
2525
const SynthOutput = ({ stacks }: SynthOutputConfig): React.ReactElement => {
2626
return (
2727
<Text>
28-
Generated Terraform code for the stacks:{" "}
29-
{stacks?.map((s) => s.name).join(", ")}
28+
{stacks?.length ? (
29+
`Generated Terraform code for the stacks: ${stacks.map((s) => s.name).join(", ")}`
30+
) : (
31+
"No stacks found in configuration."
32+
)}
3033
</Text>
3134
);
3235
};

0 commit comments

Comments
 (0)