fixed logging when GIT_DIR is none

This commit is contained in:
Jakobus Schürz 2019-09-06 00:38:07 +02:00
parent 8fbf51be7a
commit ea02faf354

View file

@ -66,10 +66,12 @@ 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)