Skip to content

Commit 0c7c769

Browse files
author
Shashank Venkat
committed
Reverted changes in add.py
1 parent 319d131 commit 0c7c769

File tree

1 file changed

+2
-2
lines changed
  • src/ansible_creator/subcommands

1 file changed

+2
-2
lines changed

src/ansible_creator/subcommands/add.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ def _plugin_scaffold(self, plugin_path: Path) -> None:
211211

212212
elif self._plugin_type == "module":
213213
template_data = self._get_plugin_template_data()
214+
plugin_path = self._add_path / "plugins" / "sample_module"
215+
plugin_path.mkdir(parents=True, exist_ok=True)
214216
self._perform_module_plugin_scaffold(template_data, plugin_path)
215217
else:
216218
msg = f"Unsupported plugin type: {self._plugin_type}"
@@ -251,8 +253,6 @@ def _perform_module_plugin_scaffold(
251253
template_data: TemplateData,
252254
plugin_path: Path,
253255
) -> None:
254-
plugin_path = self._add_path / "plugins" / "sample_module"
255-
plugin_path.mkdir(parents=True, exist_ok=True)
256256
resources = ("collection_project.plugins.sample_module",)
257257
self._perform_plugin_scaffold(resources, template_data, plugin_path)
258258

0 commit comments

Comments
 (0)