We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ce02cc commit e7fbd6eCopy full SHA for e7fbd6e
1 file changed
root/.chezmoitemplates/shell/asdf-direnv
@@ -1,18 +1,12 @@
1
{{- $direnv_bin := "" -}}
2
{{- $asdf := "asdf" -}}
3
4
-{{- $direnv_bin = output `sh` `-c` `asdf which direnv 2>/dev/null || true` -}}
5
-{{- if regexMatch "No version" $direnv_bin -}}
6
-{{- $direnv_bin = "" -}}
7
-{{- else -}}
8
-{{- $direnv_bin = trim $direnv_bin -}}
9
-{{- end -}}
10
-
11
-{{- if not $direnv_bin -}}
+{{- $direnv_bin = output `sh` `-c` `asdf which direnv 2>/dev/null || true` | trim -}}
+{{- if or (regexMatch `(N|n)o version` $direnv_bin) (not $direnv_bin) -}}
12
{{- $direnv_bin = lookPath "direnv" -}}
13
{{- end -}}
14
15
-{{- if $direnv_bin -}}
+{{- if stat $direnv_bin -}}
16
### Do not edit. This was autogenerated by 'asdf cmd direnv setup' ###
17
export ASDF_DIRENV_BIN=" {{- $direnv_bin -}} "
18
{{
0 commit comments