You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@casbin.apache.org by hs...@apache.org on 2026/08/06 16:26:59 UTC
(casbin-ex) 01/02: fix: pin git_hooks project_path so hooks run from project root
This is an automated email from the ASF dual-hosted git repository.
hsluoyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/casbin-ex.git
commit b8e307002ad7a7b7006c1307c5b03450f8861918
Author: Yang Luo <hs...@gmail.com>
AuthorDate: Fri Aug 7 00:26:22 2026 +0800
fix: pin git_hooks project_path so hooks run from project root
auto_install baked deps/git_hooks into the generated pre-push hook, so it
ran mix from the dependency directory and failed on that dependency's own
unfetched deps instead of ever checking casbin-ex.
---
config/config.exs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/config/config.exs b/config/config.exs
index 281d90c..53bba1f 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -2,6 +2,9 @@ import Config
if Mix.env() == :dev do
config :git_hooks,
+ # Pin the project root, otherwise auto_install bakes deps/git_hooks into
+ # the generated hook and it runs mix from the dependency's own directory.
+ project_path: File.cwd!(),
auto_install: true,
verbose: true,
hooks: [
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@casbin.apache.org
For additional commands, e-mail: commits-help@casbin.apache.org