Skip to content

Commit 858eeac

Browse files
authored
Merge pull request #147 from opsmill/pog-list-names
Also list generators and jinja2 transforms if no name is provided
2 parents 344c8d3 + b5f60d6 commit 858eeac

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

changelog/140.fixed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
CTL: List available transforms if no name is provided
1+
CTL: List available transforms and generators if no name is provided

infrahub_sdk/ctl/cli_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def render(
267267
variables_dict = parse_cli_vars(variables)
268268
repository_config = get_repository_config(Path(config.INFRAHUB_REPO_CONFIG_FILE))
269269

270-
if list_available:
270+
if list_available or not transform_name:
271271
list_jinja2_transforms(config=repository_config)
272272
return
273273

infrahub_sdk/ctl/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async def run(
2323
) -> None: # pylint: disable=unused-argument
2424
repository_config = get_repository_config(Path(config.INFRAHUB_REPO_CONFIG_FILE))
2525

26-
if list_available:
26+
if list_available or not generator_name:
2727
list_generators(repository_config=repository_config)
2828
return
2929

0 commit comments

Comments
 (0)