rycus86 / githooks

Githooks: per-repo and global Git hooks with version control
MIT License
381 stars 20 forks source link

Bugfix: Dont overwrite running hooks. #56

Closed gabyx closed 4 years ago

gabyx commented 4 years ago

Some small bugfix. Thx for merging.

This will work for sure on UNIX.

# Try to delete this hook first, because it could be currently running.
# The file stays around till the last file descriptor is freed.
rm -f "$TARGET_HOOK" >/dev/null 2>&1

On Windows it might not (cannot delete open files...) resulting in the same behavior which did not make problems so far on windows.

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 420


Totals Coverage Status
Change from base Build 415: 0.007%
Covered Lines: 1721
Relevant Lines: 1976

💛 - Coveralls
gabyx commented 4 years ago

Thx, wrong stuff in the commit, now it should be mergebale. Sorry for my eagerness!

rycus86 commented 4 years ago

That's OK, thanks for the quick fix! :)