From 5fed8a8770fe30452dda400616a76e7ffce19597 Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Nov 22 2018 12:39:25 +0000 Subject: Update pagure/hooks/files/hookrunner Set pagure environment for git clone, just like pagure.wsgi Fix #4031 Merges #4051 --- diff --git a/pagure/hooks/files/hookrunner b/pagure/hooks/files/hookrunner index c583c97..3736470 100755 --- a/pagure/hooks/files/hookrunner +++ b/pagure/hooks/files/hookrunner @@ -10,6 +10,9 @@ """ import os import sys +# The following is only needed if you did not install pagure +# as a python module (for example if you run it from a git clone). +#sys.path.insert(0, '/path/to/pagure/') if "PAGURE_CONFIG" not in os.environ and os.path.exists( "/etc/pagure/pagure.cfg"