Skip to content

Commit e3e2477

Browse files
committed
Allow spaces in .tool_versions file path
This helps to address (though may not completely fix) issue asdf-vm#202.
1 parent 29a29f1 commit e3e2477

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎lib/utils.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ parse_asdf_version_file() {
196196
local plugin_name=$2
197197

198198
if [ -f "$file_path" ]; then
199-
local version=$(grep "${plugin_name} " $file_path | sed -e "s/^${plugin_name} //")
199+
local version=$(grep "${plugin_name} " "$file_path" | sed -e "s/^${plugin_name} //")
200200
if [ -n "$version" ]; then
201201
echo $version
202202
return 0
@@ -211,7 +211,7 @@ parse_legacy_version_file() {
211211
local plugin_path=$(get_plugin_path "$plugin_name")
212212
local parse_legacy_script="${plugin_path}/bin/parse-legacy-file"
213213

214-
if [ -f $file_path ]; then
214+
if [ -f "$file_path" ]; then
215215
if [ -f $parse_legacy_script ]; then
216216
echo $(bash "$parse_legacy_script" "$file_path")
217217
else

0 commit comments

Comments
 (0)