During environment caching, asdf direnv plugin invokes exec-env on all plugins registered in .tool-versions; unfortunately, exec-env is not called via absolute path, so calling gcloud plugin's exec-env results in:
direnv: loading ~/.asdf/plugins/gcloud/bin/exec-env
./exec-env:10: ./lib/utils.bash: No such file or directory
Since that script internally uses dirname and path used to invoke script is relative to current directory (thus, ./exec-env).
Using realpath around "$current_script_path", if available, should solve this issue.
Steps to reproduce
Have .envrc in place
Add use asdf in .envrc, if missing
Ensure that a version for gcloud is declared in asdf, either via .tool-versions or using asdf shell gcloud
Describe the bug
During environment caching, asdf direnv plugin invokes exec-env on all plugins registered in .tool-versions; unfortunately, exec-env is not called via absolute path, so calling gcloud plugin's exec-env results in:
Since that script internally uses dirname and path used to invoke script is relative to current directory (thus,
./exec-env
).Using
realpath
around"$current_script_path"
, if available, should solve this issue.Steps to reproduce
.envrc
in placeuse asdf
in.envrc
, if missing.tool-versions
or usingasdf shell gcloud
direnv allow
asdf version
v0.10.2
asdf-gcloud version
main f59e332
gcloud version
394.0.0
Additional Information
No response