Skip to content

Commit

Permalink
Install git pre-commit hook only if there's a directory to put it in
Browse files Browse the repository at this point in the history
Closes: Eyescale#603
  • Loading branch information
umlaeute committed Mar 7, 2023
1 parent f565154 commit e1186bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GitHooks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()

# Installing clang-format precommit hook if prerequisites are met and it doesn't
# exist yet.
if(GIT_FOUND AND CLANG_FORMAT AND EXISTS ${PROJECT_SOURCE_DIR}/.git AND
if(GIT_FOUND AND CLANG_FORMAT AND EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/ AND
NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit)

# We cannot write the file from here because we need exec permissions
Expand Down

0 comments on commit e1186bf

Please sign in to comment.