Commit de8c5e78 authored by Eli Schwartz's avatar Eli Schwartz Committed by Allan McRae
Browse files

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's avatarEli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>
parent 737596f0
......@@ -35,8 +35,7 @@ lint_one_pkgname() {
if [[ -z $name ]]; then
error "$(gettext "%s is not allowed to be empty.")" "$type"
ret=1
continue
return 1
fi
if [[ ${name:0:1} = "-" ]]; then
error "$(gettext "%s is not allowed to start with a hyphen.")" "$type"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment