1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-21 23:38:49 -05:00

lint_pkgbuild/pkgname: pkgname is not allowed to be empty

We checked for empty array elements, but did not catch empty array. Add
a check for that case as well.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Christian Hesse 2016-10-04 10:21:11 +02:00 committed by Allan McRae
parent 0c99eabd50
commit e2b4e220bc

View File

@ -32,6 +32,11 @@ lint_pkgbuild_functions+=('lint_pkgname')
lint_pkgname() {
local ret=0 i
if [[ -z ${pkgname[@]} ]]; then
error "$(gettext "%s is not allowed to be empty.")" "pkgname"
return 1
fi
for i in "${pkgname[@]}"; do
if [[ -z $i ]]; then
error "$(gettext "%s is not allowed to be empty.")" "pkgname"