From 9065ef901cfbd20d093a890cd092ae35237dfc0a Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 10 Apr 2021 11:24:39 +0200 Subject: [PATCH] Improved new command to handle existing projects better --- src/cpl_cli/command/new_service.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cpl_cli/command/new_service.py b/src/cpl_cli/command/new_service.py index 8f68350d..87349515 100644 --- a/src/cpl_cli/command/new_service.py +++ b/src/cpl_cli/command/new_service.py @@ -131,7 +131,11 @@ class NewService(CommandABC): if self._workspace is None: project_path = os.path.join(self._env.working_directory, self._project.name) else: - project_path = os.path.join(self._env.working_directory, 'src', self._project.name) + project_path = os.path.join( + self._env.working_directory, + 'src', + String.convert_to_snake_case(self._project.name) + ) if os.path.isdir(project_path) and len(os.listdir(project_path)) > 0: Console.error('Project path is not empty\n')