summaryrefslogtreecommitdiffstats
path: root/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in')
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in
index a0440827..b66eda68 100644
--- a/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in
@@ -2,7 +2,7 @@
#
# pkgname.sh - Check the 'pkgname' variable conforms to requirements.
#
-# Copyright (c) 2014-2016 Pacman Development Team <pacman-dev@archlinux.org>
+# Copyright (c) 2014-2017 Pacman Development Team <pacman-dev@archlinux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -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"