Improved file creation new command
This commit is contained in:
parent
1f8d420749
commit
5712a9ad67
@ -27,6 +27,9 @@ class ConsoleBuilder:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _create_file(file_name: str, content: dict):
|
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)
|
path = os.path.dirname(file_name)
|
||||||
if not os.path.isdir(path):
|
if not os.path.isdir(path):
|
||||||
os.makedirs(path)
|
os.makedirs(path)
|
||||||
|
Loading…
Reference in New Issue
Block a user