commit | f46dc03b9dc91998fa0f9918f457a448e47dc26b | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Tue Dec 08 16:54:36 2020 -0800 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Dec 09 01:30:36 2020 +0000 |
tree | a0c8b3fe6af641d6494f8a023137d5fcdf100f8c | |
parent | f7e38b3ec318a03c4e1dc081943d9bd4e6883666 [diff] |
pw_presubmit: Create .git/hooks if it doesn't exist Change-Id: Iadb59bff6e56c787af1b883ec1c521da41117f4b Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/27080 Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com> Reviewed-by: Rob Mohr <mohrr@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_presubmit/py/pw_presubmit/install_hook.py b/pw_presubmit/py/pw_presubmit/install_hook.py index 1df7011..7a87d1f 100755 --- a/pw_presubmit/py/pw_presubmit/install_hook.py +++ b/pw_presubmit/py/pw_presubmit/install_hook.py
@@ -41,6 +41,7 @@ script = os.path.relpath(script, root) hook_path = root.joinpath('.git', 'hooks', hook) + hook_path.parent.mkdir(exist_ok=True) command = ' '.join(shlex.quote(arg) for arg in (script, *args))