Fix non-master branch switching for repos
This commit is contained in:
parent
fc12634fbb
commit
a5274f123c
@ -19,9 +19,10 @@ def clone_apps():
|
||||
repos = [[p["name"], p["ssh_url"]] for p in response.json()]
|
||||
for name, url in repos:
|
||||
try:
|
||||
if not exists(f"{clones}/{name}"):
|
||||
run(split(f"git clone {url} {clones}/{name}"))
|
||||
chdir(f"{clones}/{name}")
|
||||
if not check_output("git branch --list | wc -l", shell=True):
|
||||
if not int(check_output("git branch --list | wc -l", shell=True)):
|
||||
run(split("git checkout main"))
|
||||
except Exception:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user