mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Fix edge case when looking for .asdf-version
cwd can potentially be a symlink, which breaks asdf logic. The following command will fail to resolve the path correctly: env - PWD=/proc/self/cwd PATH=$HOME/.asdf/shims:/bin ruby --version This first resolves the real path of cwd before continuing to search for a .tool-versions file
This commit is contained in:
parent
7e5789adb7
commit
a44ec2779a
@ -243,7 +243,7 @@ parse_legacy_version_file() {
|
||||
get_preset_version_for() {
|
||||
local plugin_name=$1
|
||||
local search_path
|
||||
search_path=$(pwd)
|
||||
search_path=$(realpath "$(pwd)")
|
||||
local version_and_path
|
||||
version_and_path=$(find_version "$plugin_name" "$search_path")
|
||||
local version
|
||||
|
Loading…
Reference in New Issue
Block a user