1
0
mirror of https://github.com/EeeeKa/webhook-catcher.git synced 2025-09-24 03:42:10 +05:00

Fix --work-tree parameter

This commit is contained in:
Дмитрий Рамазанов 2020-08-03 12:07:49 +05:00
parent 23d54b75e4
commit d036bf1bd0

View File

@ -1,7 +1,7 @@
#!/usr/bin/python3 #!/usr/bin/python3
# #
# Webhook-catcher v1.0 # Webhook-catcher v1.1
# #
import os import os
@ -32,7 +32,7 @@ from signal import signal, SIGHUP, SIGTERM
from pprint import pprint from pprint import pprint
PROG_NAME = "Webhook-catcher" PROG_NAME = "Webhook-catcher"
PROG_VERSION = "v1.0" PROG_VERSION = "v1.1"
PROG_DESCRIPTION = '\ PROG_DESCRIPTION = '\
Simple HTTP-server for processing webhooks from Github or Gogs portals.\n\ Simple HTTP-server for processing webhooks from Github or Gogs portals.\n\
\n\ \n\
@ -371,7 +371,7 @@ class WebHookWorker(object):
def git_pull(cls, repo): def git_pull(cls, repo):
if os.path.isdir(repo['dir']): if os.path.isdir(repo['dir']):
result = subprocess.run([ result = subprocess.run([
"git", "--git-dir", os.path.join(repo['dir'], '.git'), "pull", "git", "--git-dir", os.path.join(repo['dir'], '.git'), "--work-tree", repo['dir'], "pull",
repo['remote'], repo['branch'], repo['remote'], repo['branch'],
], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
else: else: