From e2b4e220bcb6d3770716fb000953aa729ed07989 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 4 Oct 2016 10:21:11 +0200 Subject: 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 Signed-off-by: Allan McRae --- scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/libmakepkg/lint_pkgbuild') diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in index a0440827..1a1a5b12 100644 --- a/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in @@ -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" -- cgit v1.2.3-24-g4f1b