libmakepkg/lint_pkgbuild: squelch syntax error when a pkgname is empty

We fail with an error, but then we also fail with:

==> ERROR: depends is not allowed to be empty.
/usr/share/makepkg/lint_pkgbuild/pkgname.sh: line 39: continue: only meaningful in a `for', `while', or `until' loop

During the refactor to provide enhanced pkgname=pkgver linting, this was
moved out of the ${pkgname[@]} loop to a distinct function, at which
time it should have been modified to return rather than continue.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Eli Schwartz 2018-05-31 20:31:23 -04:00 committed by Allan McRae
parent 737596f038
commit de8c5e78bb

View file

@ -35,8 +35,7 @@ lint_one_pkgname() {
if [[ -z $name ]]; then if [[ -z $name ]]; then
error "$(gettext "%s is not allowed to be empty.")" "$type" error "$(gettext "%s is not allowed to be empty.")" "$type"
ret=1 return 1
continue
fi fi
if [[ ${name:0:1} = "-" ]]; then if [[ ${name:0:1} = "-" ]]; then
error "$(gettext "%s is not allowed to start with a hyphen.")" "$type" error "$(gettext "%s is not allowed to start with a hyphen.")" "$type"