From c0ce5362eaa8a9fdad582dd3b0cb524fd421eae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Wed, 8 Nov 2017 20:57:17 -0500 Subject: [PATCH] Include cwd in update --- check_update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_update.py b/check_update.py index 5b4196510..1ef061ce1 100644 --- a/check_update.py +++ b/check_update.py @@ -4,8 +4,8 @@ import os import subprocess def check_and_apply_update(): - result = subprocess.check_output(["git", "pull", '--dry-run', 'origin', branch], stderr=subprocess.STDOUT, shell=True).split('\n') + result = subprocess.check_output(["git", "pull", '--dry-run', 'origin', branch], stderr=subprocess.STDOUT, shell=True, cwd=os.path.join(os.path.dirname(__file__)).split('\n') if result[2] is not '': - subprocess.check_output(["git", "pull", 'origin', branch], shell=True) + subprocess.check_output(["git", "pull", 'origin', branch], shell=True, cwd=os.path.join(os.path.dirname(__file__)) os.execlp('python', 'python ' + os.path.join(os.path.dirname(__file__), 'bazarr.py'))