fix logging if GIT_DIR is none

This commit is contained in:
Jakobus Schürz 2019-09-06 00:23:52 +02:00
parent 2039e7fb10
commit 9defb275d3

View file

@ -66,10 +66,11 @@ class Main(app.App):
os.umask(0022) os.umask(0022)
git_dir = os.environ.get('GIT_DIR') git_dir = os.environ.get('GIT_DIR')
log.debug("GIT_DIR", git_dir)
if git_dir is None: if git_dir is None:
log.error('Must have GIT_DIR set in enviroment') log.error('Must have GIT_DIR set in enviroment')
sys.exit(1) sys.exit(1)
else:
log.debug("GIT_DIR", git_dir)
if hook == 'post-update': if hook == 'post-update':
log.info('Running hook %s', hook) log.info('Running hook %s', hook)