mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
fix: get invalid ASDF_DATA_DIR when exec asdf shims by non-shell (#1154)
* fix: get invalid ASDF_DATA_DIR when exec asdf shims by non-shell asdf_data_dir function inits ASDF_DATA_DIR with HOME when value is empty. HOME may replace to empty string when asdf shims called by non-shell program. this makes invalid value of ASDF_DATA_DIR.
This commit is contained in:
parent
92d005dacd
commit
b9962f7156
@ -41,8 +41,10 @@ asdf_data_dir() {
|
||||
|
||||
if [ -n "${ASDF_DATA_DIR}" ]; then
|
||||
data_dir="${ASDF_DATA_DIR}"
|
||||
else
|
||||
elif [ -n "$HOME" ]; then
|
||||
data_dir="$HOME/.asdf"
|
||||
else
|
||||
data_dir=$(asdf_dir)
|
||||
fi
|
||||
|
||||
printf "%s\\n" "$data_dir"
|
||||
|
Loading…
Reference in New Issue
Block a user