From 27ea918d1c2810dda69d8202766290beb2fc3022 Mon Sep 17 00:00:00 2001 From: cobycloud <25079070+cobycloud@users.noreply.github.com> Date: Wed, 18 Dec 2024 00:23:15 -0600 Subject: [PATCH] Update create_component.py --- scripts/create_component.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/create_component.py b/scripts/create_component.py index f546d73e..7affa750 100644 --- a/scripts/create_component.py +++ b/scripts/create_component.py @@ -73,7 +73,9 @@ def main(): if not all(key in placeholders for key in ["package_scope", "resource_kind", "package_name"]): raise ValueError("Missing required placeholders: package_scope, resource_kind, package_name") - dynamic_output_path = Path(args.output) / placeholders["package_scope"] / placeholders["resource_kind"] / placeholders["package_name"] + if placeholders["resource_kind"].endswith("s") != 's': + placeholders["resource_kind"] = f"{placeholders["resource_kind"]}s" + dynamic_output_path = Path(args.output) / placeholders["package_scope"].lower() / placeholders["resource_kind"].lower() / placeholders["package_name"] # Generate the project create_component(args.template, dynamic_output_path, placeholders)