change dir before returning 0
@@ -137,6 +137,9 @@ class Plugin:
if not response[0]:
return -1, cwd
+ # set to new repo path
+ os.chdir(self.path)
+
if response[0] and response[1] == 'exists':
try:
status = subprocess.check_output(shlex.split("git -C "+self.path+" rev-parse"), stderr=subprocess.STDOUT)
@@ -144,9 +147,6 @@ class Plugin:
except Exception as e:
return -1, cwd
- # set to new repo path
- os.chdir(self.path)
-
# ensure cloning still works even if ssl is broken...probably should be improved
try:
status = subprocess.check_output(shlex.split("git config --global http.sslVerify false"), stderr=subprocess.STDOUT)
