Skip to content

Commit

Permalink
Fixed config file parsing to handle "=" in value field.
Browse files Browse the repository at this point in the history
  • Loading branch information
David le Blanc authored and Stratus3D committed Jan 27, 2022
1 parent 06d469e commit afd6224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ get_asdf_config_value_from_file() {
fi

local result
result=$(grep -E "^\\s*$key\\s*=\\s*" "$config_path" | head | awk -F '=' '{print $2}' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
result=$(grep -E "^\\s*$key\\s*=\\s*" "$config_path" | head | sed -e 's/^[^=]*= *//' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
if [ -n "$result" ]; then
printf "%s\\n" "$result"
return 0
Expand Down

0 comments on commit afd6224

Please sign in to comment.