Skip to content

Commit

Permalink
Merge pull request #6276 from mishaschwartz/git-hook-symlink-fix
Browse files Browse the repository at this point in the history
Git hooks are not being run server side because of symlink issues
  • Loading branch information
mishaschwartz authored Oct 6, 2022
2 parents 31e90ee + cd8f69d commit c21d827
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [v2.1.4]
- Fix bug where git hooks are not run server side when symlinked (#6276)

## [v2.1.3]
- Fix bug where automated test results were occasionally associated with the wrong grouping (#6238)

Expand Down
2 changes: 1 addition & 1 deletion app/MARKUS_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=v2.1.3,PATCH_LEVEL=DEV
VERSION=v2.1.4,PATCH_LEVEL=DEV
5 changes: 2 additions & 3 deletions lib/repo/git_hooks/multihook.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
if __name__ == '__main__':

hook_type = os.path.basename(__file__)
real_dir = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(real_dir, 'max_file_size')) as f:
with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'max_file_size')) as f:
max_file_size = f.read().strip()
hooks_dir = os.path.join(real_dir, '{}.d'.format(hook_type))
env = {**os.environ, 'MAX_FILE_SIZE': max_file_size}
hooks_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '{}.d'.format(hook_type))
if os.path.exists(hooks_dir):
scripts = sorted([os.path.join(hooks_dir, f) for f in os.listdir(hooks_dir)])
for script in scripts:
Expand Down

0 comments on commit c21d827

Please sign in to comment.