diff --git a/git_nit/cmd.py b/git_nit/cmd.py index 6941e38..48ce66a 100644 --- a/git_nit/cmd.py +++ b/git_nit/cmd.py @@ -16,7 +16,9 @@ from __future__ import print_function import argparse import json +import os import subprocess +import sys import pkg_resources import requests @@ -115,6 +117,9 @@ def main(): else: clone_to = '{}-{}-{}'.format(short_repo, review, subject) + if os.path.exists(clone_to): + sys.exit('{} already exists'.format(clone_to)) + git_cmd = [ 'git', 'clone',