Skip to content

Commit

Permalink
envoy.base.utils(0.5.8): Fix project commit escape (#2536)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax authored Jan 13, 2025
1 parent d074c60 commit 47e9244
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion envoy.base.utils/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.8-dev
0.5.8
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ async def _git_commit(
else [])
await self._exec(
" ".join(("git", "add", *changed)))
msg = msg.replace("'", r"\'")
await self._exec(
" ".join((
"git", "commit", *author_args, *changed,
Expand Down
7 changes: 6 additions & 1 deletion envoy.base.utils/tests/test_abstract_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1072,8 +1072,13 @@ async def test_abstract_project__git_commit(iters, patches):
m_exec.call_args_list
== [[(" ".join(["git", "add", *changed]), ),
{}],
[(" ".join(["git", "commit", *changed, "-m", f"'{msg}'"]), ),
[(" ".join([
"git", "commit", *changed,
"-m", f"'{msg.replace.return_value}'"]), ),
{}]])
assert (
msg.replace.call_args
== [("'", r"\'"), {}])


@pytest.mark.parametrize("returns", [None, 0, 23, "cabbage"])
Expand Down

0 comments on commit 47e9244

Please sign in to comment.