grep for plugin_name from begining of line

This commit is contained in:
Mark Villacampa 2017-12-15 22:36:24 +01:00
parent 8794210b8e
commit 77ce346578

View File

@ -214,7 +214,7 @@ parse_asdf_version_file() {
if [ -f "$file_path" ]; then
local version
version=$(grep "${plugin_name} " "$file_path" | sed -e "s/^${plugin_name} //")
version=$(grep "^${plugin_name} " "$file_path" | sed -e "s/^${plugin_name} //")
if [ -n "$version" ]; then
echo "$version"
return 0