fix error if destination arg is not provided
This commit is contained in:
parent
7be5570d21
commit
263eb013e4
@ -52,7 +52,8 @@ class Template():
|
||||
f.writelines(lines)
|
||||
|
||||
def copy_files(self, destination, project_name):
|
||||
dest = pathlib.Path(destination)
|
||||
project_name = project_name.replace(" ", "_")
|
||||
dest = pathlib.Path(destination).joinpath(project_name)
|
||||
if dest.exists() and dest.is_dir():
|
||||
if len(list(dest.glob("*.*"))) > 0:
|
||||
raise ValueError(f"Destination folder ({str(dest.absolute())}) already exists and is not empty")
|
||||
|
Loading…
Reference in New Issue
Block a user