Skip to content

Commit bdd1a62

Browse files
committed
Fix
1 parent b8e455c commit bdd1a62

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

src/run_git.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,13 @@ def git_commit_changes(
5050
run_subprocess_command(
5151
["git", "commit", f"--author={commit_author}", "-m", commit_message]
5252
)
53-
run_subprocess_command(
54-
[
55-
"git",
56-
"push",
57-
"-u",
58-
"-f" if force_push else "",
59-
"origin",
60-
commit_branch_name,
61-
]
62-
)
53+
push_command = ["git", "push", "-u"]
54+
55+
if force_push:
56+
push_command.append("-f")
57+
58+
push_command.extend(["origin", commit_branch_name])
59+
run_subprocess_command(push_command)
6360

6461

6562
def git_has_changes() -> bool:

0 commit comments

Comments
 (0)