check for the output directory before trying to run any commands
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
4b6b5bc8bf
commit
dda72e3079
|
@ -16,7 +16,9 @@ from __future__ import print_function
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
import requests
|
import requests
|
||||||
|
@ -115,6 +117,9 @@ def main():
|
||||||
else:
|
else:
|
||||||
clone_to = '{}-{}-{}'.format(short_repo, review, subject)
|
clone_to = '{}-{}-{}'.format(short_repo, review, subject)
|
||||||
|
|
||||||
|
if os.path.exists(clone_to):
|
||||||
|
sys.exit('{} already exists'.format(clone_to))
|
||||||
|
|
||||||
git_cmd = [
|
git_cmd = [
|
||||||
'git',
|
'git',
|
||||||
'clone',
|
'clone',
|
||||||
|
|
Loading…
Reference in New Issue