better error message

This commit is contained in:
jobevers 2017-02-09 19:42:28 -06:00
parent fa2a7fd4c9
commit 780c742407

View file

@ -62,8 +62,11 @@ def get_system():
def current_repo_name():
pattern = 'github.com[:/](.*).git'
m = re.search(pattern, subprocess.check_output('git remote -v'.split()))
pattern = 'github.com[:/](.*)\.git'
remote = subprocess.check_output('git remote -v'.split())
m = re.search(pattern, remote)
if not m:
raise Exception('Unable to parse repo name from remote: {}'.format(remote))
return m.group(1)