mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-12-22 13:42:14 +01:00
gitinspector now exits if it fails to change directory to the repo root.
This commit is contained in:
parent
84bb7bed2d
commit
8edd72a609
1 changed files with 5 additions and 1 deletions
|
@ -64,7 +64,11 @@ class Runner:
|
|||
os.chdir(self.repo)
|
||||
absolute_path = subprocess.Popen("git rev-parse --show-toplevel", shell=True, bufsize=1,
|
||||
stdout=subprocess.PIPE).stdout
|
||||
os.chdir(absolute_path.readlines()[0].decode("utf-8", "replace").strip())
|
||||
absolute_path = absolute_path.readlines()
|
||||
if len(absolute_path) == 0:
|
||||
sys.exit(0)
|
||||
|
||||
os.chdir(absolute_path[0].decode("utf-8", "replace").strip())
|
||||
|
||||
if not format.select(self.opts.format):
|
||||
raise format.InvalidFormatError(_("specified output format not supported."))
|
||||
|
|
Loading…
Reference in a new issue