[FIX] script todo upgrade: don't create branch if already exist
This commit is contained in:
parent
eb64155f3c
commit
e9f14c2af9
1 changed files with 3 additions and 1 deletions
|
|
@ -2038,7 +2038,9 @@ class TodoUpgrade:
|
|||
if not has_existing_target_branch:
|
||||
cmd_git_clone = (
|
||||
f"cd {target_addons_path} "
|
||||
f"&& git checkout -b {branch_target} && cd ~-"
|
||||
f"&& if git rev-parse --verify --quiet refs/heads/{branch_target}; then "
|
||||
f"git checkout {branch_target}; else git checkout -b {branch_target}; fi "
|
||||
f"&& cd ~-"
|
||||
)
|
||||
status, cmd_executed, lst_output = self.todo_upgrade_execute(
|
||||
cmd_git_clone,
|
||||
|
|
|
|||
Loading…
Reference in a new issue