use path to git from env variable for git_pull_recursive
This commit is contained in:
parent
f0a917c990
commit
1ace16e799
1 changed files with 3 additions and 1 deletions
|
@ -161,15 +161,17 @@ def git_clone(url, dir, name, commithash=None):
|
||||||
if commithash is not None:
|
if commithash is not None:
|
||||||
run(f'"{git}" -C "{dir}" checkout {commithash}', None, "Couldn't checkout {name}'s hash: {commithash}")
|
run(f'"{git}" -C "{dir}" checkout {commithash}', None, "Couldn't checkout {name}'s hash: {commithash}")
|
||||||
|
|
||||||
|
|
||||||
def git_pull_recursive(dir):
|
def git_pull_recursive(dir):
|
||||||
for subdir, _, _ in os.walk(dir):
|
for subdir, _, _ in os.walk(dir):
|
||||||
if os.path.exists(os.path.join(subdir, '.git')):
|
if os.path.exists(os.path.join(subdir, '.git')):
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output(['git', '-C', subdir, 'pull', '--autostash'])
|
output = subprocess.check_output([git, '-C', subdir, 'pull', '--autostash'])
|
||||||
print(f"Pulled changes for repository in '{subdir}':\n{output.decode('utf-8').strip()}\n")
|
print(f"Pulled changes for repository in '{subdir}':\n{output.decode('utf-8').strip()}\n")
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
print(f"Couldn't perform 'git pull' on repository in '{subdir}':\n{e.output.decode('utf-8').strip()}\n")
|
print(f"Couldn't perform 'git pull' on repository in '{subdir}':\n{e.output.decode('utf-8').strip()}\n")
|
||||||
|
|
||||||
|
|
||||||
def version_check(commit):
|
def version_check(commit):
|
||||||
try:
|
try:
|
||||||
import requests
|
import requests
|
||||||
|
|
Loading…
Reference in a new issue