On 09/06/18 04:18, morganamilo wrote:
We already ensure arch is an array but if arch is never defined this error never triggers. Add an explicit check for a missing arch.
Signed-off-by: morganamilo <morganamilo@gmail.com> ---
OK.
scripts/libmakepkg/lint_pkgbuild/arch.sh.in | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/scripts/libmakepkg/lint_pkgbuild/arch.sh.in b/scripts/libmakepkg/lint_pkgbuild/arch.sh.in index ef1aac46..f2c80c73 100644 --- a/scripts/libmakepkg/lint_pkgbuild/arch.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/arch.sh.in @@ -33,6 +33,11 @@ lint_pkgbuild_functions+=('lint_arch') lint_arch() { local a name list ret=0
+ if [[ -z $arch ]]; then + error "$(gettext "%s is not allowed to be empty.")" "arch" + return 1 + fi + if [[ $arch == 'any' ]]; then return 0 fi