puppet-git-hooks icon indicating copy to clipboard operation
puppet-git-hooks copied to clipboard

Test for bare repository is unreliable

Open sammcj opened this issue 7 years ago • 0 comments

This test for a bare repo is unreliable as it requires 'hooks' to strictly be of type 'file'.

In many environments, for example GitLab this test will fail because hooks is a symlink, not a 'file', its a symlink:

# file hooks
hooks: symbolic link to `/opt/gitlab/embedded/service/gitlab-shell/hooks'

I suggest changing the -f to -e so it works if 'hooks' exists as a file or symlink.

sammcj avatar Jun 06 '18 02:06 sammcj