No longer split on space in getNameFromDep()

This should not make any real difference as pkgnames and pkgvers
should not contain whitespace. But there was a problem where a packagepkg
connected two deps by quoting them.

depends=('make qt5-tools')

Because we split on spaces this caused yay to generate an error saying
it couldn't find 'make' when instead it should say it cant find
'make qt5tools' which was a little confusing.

This commit should fix the misleading error.
This commit is contained in:
morganamilo 2018-02-22 21:05:39 +00:00
parent 2369f6a509
commit b8f2ac0ab3
No known key found for this signature in database
GPG Key ID: 6FE9E7996B0B082E

View File

@ -45,7 +45,7 @@ func makeDependCatagories() *depCatagories {
func getNameFromDep(dep string) string {
return strings.FieldsFunc(dep, func(c rune) bool {
return c == '>' || c == '<' || c == '=' || c == ' '
return c == '>' || c == '<' || c == '='
})[0]
}