def clone(force):
"""Clone a copy of the TigerHost project to
a private location and set the project path
to the cloned location.
"""
path = default_project_path()
if os.path.exists(path):
if not force:
click.confirm('Path {} already exists. Continuing will remove this path.'.format(
path), default=True, abort=True)
if os.path.isdir(path):
shutil.rmtree(path)
else:
os.remove(path)
click.echo('Cloning to {}...'.format(path), nl=False)
clone_project()
click.secho('Done', fg='black', bg='green')
save_project_path(path)
评论列表
文章目录