Skip to content

Fix test_commit_msg_hook_success. - #925

Merged
Byron merged 1 commit into
gitpython-developers:masterfrom
uri-canva:fix-sh
Sep 28, 2019
Merged

Fix test_commit_msg_hook_success.#925
Byron merged 1 commit into
gitpython-developers:masterfrom
uri-canva:fix-sh

Conversation

@uri-canva

Copy link
Copy Markdown
Contributor

Test hooks are created with a sh shebang: https://github.com/gitpython-developers/GitPython/blob/master/git/test/test_index.py#L53

however in shecho doesn't always support -n, and can print it out:

$ bash -c "echo -n hello"
hello # <- no newline here
$ sh -c "echo -n hello"
-n hello # <- newline here

Instead of echo -n use printf which works correctly in all shs.

@ByronByron added this to the v3.0.3 - Bugfixes milestone Sep 28, 2019
@Byron

Copy link
Copy Markdown
Member

Thanks a lot for your contribution :)!
Keep 'em coming!

@Byron
Byron merged commit 4bf53a3 into gitpython-developers:masterSep 28, 2019
@uri-canva
uri-canva deleted the fix-sh branch September 28, 2019 13:14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@uri-canva@Byron