From b572a346fa8fc73e9c2ab2f96a0788271f434b70 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 7 Jul 2025 10:24:47 +0100 Subject: [PATCH] fix(zsh/direnv): correctly perform cache eval of setup --- zshrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 0393bd4..d266fe9 100644 --- a/zshrc +++ b/zshrc @@ -61,7 +61,13 @@ path_prepend "$MISE_HOME/shims" # If available, make sure to load direnv shell hook before mise. if command-exists direnv; then - cached-eval "$(command-path direnv)" direnv hook zsh + if command-exists mise; then + # If mise is available, use it to find the absolute path to direnv. + cached-eval "$(mise which direnv)" direnv hook zsh + else + # Otherwise, find it via PATH, which is likely to be mise's shim. + cached-eval "$(command-path direnv)" direnv hook zsh + fi fi # ==============================================================================