def prompt_and_delete_repo(repo_dir, no_input=False):

    # Suppress prompt if called via API
    if no_input:
        ok_to_delete = True
    else:
        question = (
            "You've cloned {0} before. "
            'Is it okay to delete and re-clone it?'
        ).format(repo_dir)

        ok_to_delete = read_user_yes_no(question, 'yes')

    if ok_to_delete:
        rmtree(repo_dir)
    else:
        sys.exit()
Fix common errors in pin data.
dataset/ETHPy150Open audreyr/cookiecutter/cookiecutter/vcs.py/prompt_and_delete_repo--crossover with--dataset/ETHPy150Open xesscorp/KiPart/kipart/common.py/fix_pin_data