diff options
| author | 2021-07-11 15:48:07 -0400 | |
|---|---|---|
| committer | 2021-07-11 15:48:07 -0400 | |
| commit | 7059bb2bf8b03837822aa915fb5ec78cfb201a30 (patch) | |
| tree | d6a309c1c34ca7945913c8c085f1c1e05a15b732 | |
| parent | Merge pull request #6576 from ameerj/unlock-fps-setting (diff) | |
| parent | cmake: Only copy pre-commit hook if .git directory exists (diff) | |
| download | yuzu-7059bb2bf8b03837822aa915fb5ec78cfb201a30.tar.gz yuzu-7059bb2bf8b03837822aa915fb5ec78cfb201a30.tar.xz yuzu-7059bb2bf8b03837822aa915fb5ec78cfb201a30.zip | |
Merge pull request #6577 from ReinUsesLisp/precommit
cmake: Only copy pre-commit hook if .git directory exists
Diffstat (limited to '')
| -rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b1734f36..716256cd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -47,9 +47,10 @@ if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE) | |||
| 47 | endif() | 47 | endif() |
| 48 | 48 | ||
| 49 | if(EXISTS ${PROJECT_SOURCE_DIR}/hooks/pre-commit AND NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit) | 49 | if(EXISTS ${PROJECT_SOURCE_DIR}/hooks/pre-commit AND NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit) |
| 50 | message(STATUS "Copying pre-commit hook") | 50 | if (EXISTS ${PROJECT_SOURCE_DIR}/.git/) |
| 51 | file(COPY hooks/pre-commit | 51 | message(STATUS "Copying pre-commit hook") |
| 52 | DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks) | 52 | file(COPY hooks/pre-commit DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks) |
| 53 | endif() | ||
| 53 | endif() | 54 | endif() |
| 54 | 55 | ||
| 55 | # Sanity check : Check that all submodules are present | 56 | # Sanity check : Check that all submodules are present |