mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-09-27 18:01:30 +02:00
gitinspector now exits if it fails to change directory to the repo root.
This commit is contained in:
parent
84bb7bed2d
commit
8edd72a609
@ -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 New Issue
Block a user