mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 09:38:16 -07:00
4d75ddd50b
current will now print paths to legacy files and .tool-version files
16 lines
410 B
Bash
16 lines
410 B
Bash
current_command() {
|
|
local plugin_name=$1
|
|
|
|
check_if_plugin_exists $plugin_name
|
|
local version_file_path=$(find_version_file_for $plugin_name)
|
|
local version=$(parse_version_file $version_file_path $plugin_name)
|
|
check_if_version_exists $plugin_name $version
|
|
|
|
if [ -z "$version" ]; then
|
|
echo "No version set for $plugin_name"
|
|
exit 1
|
|
else
|
|
echo "$version (set by $version_file_path)"
|
|
fi
|
|
}
|