🪓 feat: sub task refinement

This commit is contained in:
Florian Hönicke
2023-05-09 16:17:34 +02:00
parent 1f86461e1c
commit afbafe164d
17 changed files with 685 additions and 468 deletions

View File

@@ -35,6 +35,9 @@ def path_param(func):
def wrapper(*args, **kwargs):
path = os.path.expanduser(kwargs['path'])
path = os.path.abspath(path)
if os.path.exists(path) and os.listdir(path):
click.echo(f"Error: The path {path} you provided via --path is not empty. Please choose a directory that does not exist or is empty.")
exit(1)
kwargs['path'] = path
return func(*args, **kwargs)
return wrapper