Skip to content

Commit bb6f258

Browse files
author
Shashank Venkat
committed
Updated add.py
1 parent 68c8977 commit bb6f258

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

src/ansible_creator/subcommands/add.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,7 @@ def _plugin_scaffold(self, plugin_path: Path) -> None:
210210
self._perform_lookup_plugin_scaffold(template_data, plugin_path)
211211
elif self._plugin_type == "module":
212212
template_data = self._get_plugin_template_data()
213-
module_path = self._add_path / "plugins" / "sample_module"
214-
module_path.mkdir(parents=True, exist_ok=True)
215-
self._perform_module_plugin_scaffold(template_data, module_path)
213+
self._perform_module_plugin_scaffold(template_data, plugin_path)
216214
else:
217215
msg = f"Unsupported plugin type: {self._plugin_type}"
218216
raise CreatorError(msg)
@@ -252,8 +250,10 @@ def _perform_module_plugin_scaffold(
252250
template_data: TemplateData,
253251
plugin_path: Path,
254252
) -> None:
253+
module_path = self._add_path / "plugins" / "sample_module"
254+
module_path.mkdir(parents=True, exist_ok=True)
255255
resources = ("collection_project.plugins.sample_module",)
256-
self._perform_plugin_scaffold(resources, template_data, plugin_path)
256+
self._perform_plugin_scaffold(resources, template_data, module_path)
257257

258258
def _perform_plugin_scaffold(
259259
self,

0 commit comments

Comments
 (0)