better error message
This commit is contained in:
parent
fa2a7fd4c9
commit
780c742407
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue