Fixed #21 - Added logic to automatically add 'src' to path in generate command

This commit is contained in:
Sven Heidemann 2021-04-07 16:55:44 +02:00
parent b91544a0da
commit de15e81703

View File

@ -102,6 +102,9 @@ class GenerateService(CommandABC):
rel_path = '/'.join(parts[:-1])
class_name = parts[len(parts) - 1]
if 'src' not in name:
rel_path = f'src/{rel_path}'
template = template(class_name, schematic, self._schematics[schematic]["Upper"], rel_path)
file_path = os.path.join(self._env.working_directory, template.path, template.name)