Improved file creation new command

This commit is contained in:
Sven Heidemann 2021-04-10 11:50:35 +02:00
parent 1f8d420749
commit 5712a9ad67

View File

@ -27,6 +27,9 @@ class ConsoleBuilder:
@staticmethod
def _create_file(file_name: str, content: dict):
if not os.path.isabs(file_name):
file_name = os.path.abspath(file_name)
path = os.path.dirname(file_name)
if not os.path.isdir(path):
os.makedirs(path)