Installed Hooks error out
Hi. I am using a test repo where I'm trying to set up pre-commit hooks. I ran the commands bazel run //devops/hooks:config, bazel run //devops/hooks:run (which does run everything fine), and bazel run //devops/hooks:install. But after installing the hooks, I can no longer git commit, and encounter this error:
Traceback (most recent call last):
File "/private/var/tmp/_bazel_tmp/95db0262e119e2a403038b79ad927d0d/execroot/_main/bazel-out/darwin_arm64-opt-exec-ST-d57f47055a04/bin/external/pre-commit+/pre-commit/pre-commit", line 580, in <module>
Main()
~~~~^^
File "/private/var/tmp/_bazel_tmp/95db0262e119e2a403038b79ad927d0d/execroot/_main/bazel-out/darwin_arm64-opt-exec-ST-d57f47055a04/bin/external/pre-commit+/pre-commit/pre-commit", line 471, in Main
module_space = FindModuleSpace(main_rel_path)
File "/private/var/tmp/_bazel_tmp/95db0262e119e2a403038b79ad927d0d/execroot/_main/bazel-out/darwin_arm64-opt-exec-ST-d57f47055a04/bin/external/pre-commit+/pre-commit/pre-commit", line 181, in FindModuleSpace
raise AssertionError('Cannot find .runfiles directory for %s' % sys.argv[0])
AssertionError: Cannot find .runfiles directory for /private/var/tmp/_bazel_tmp/95db0262e119e2a403038b79ad927d0d/execroot/_main/bazel-out/darwin_arm64-opt-exec-ST-d57f47055a04/bin/external/pre-commit+/pre-commit/pre-commit
Any suggestions?