mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-21 15:28:50 -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:
parent
0c99eabd50
commit
e2b4e220bc
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user