Unverified Commit a34a2156 authored by Kip's avatar Kip Committed by GitHub

Merge pull request #935 from Tachi107/format-hook-optional-git

Set up commit hook only if master project and make it "optional"
parents 91510e35 e47d23e5
......@@ -107,4 +107,9 @@ if get_option('PISTACHE_BUILD_DOCS')
subdir('docs')
endif
run_command('git', 'config', '--local', 'core.hooksPath', '.hooks')
\ No newline at end of file
if not meson.is_subproject()
git = find_program('git', required: false)
if git.found()
run_command(git, 'config', '--local', 'core.hooksPath', meson.source_root()/'.hooks')
endif
endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment