From 9f1b735d76d04665d6324e723e163a52ca27567c Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 27 Nov 2018 23:00:36 -0500 Subject: libmakepkg/executable: don't rely on scoped value of $ret to flag outcomes Elsewhere, we return 1 if a library dropin fails, and when running functions in a loop, we use `|| ret=1` to preserve scope. This ensures the return value of the function remains useful in isolation. Do the same thing here as well. Drop trivial function which wraps a dropin that also uses $ret, since it's no longer needed. Signed-off-by: Eli Schwartz Signed-off-by: Allan McRae --- scripts/libmakepkg/executable.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/libmakepkg/executable.sh.in') diff --git a/scripts/libmakepkg/executable.sh.in b/scripts/libmakepkg/executable.sh.in index 68c48038..92031d43 100644 --- a/scripts/libmakepkg/executable.sh.in +++ b/scripts/libmakepkg/executable.sh.in @@ -38,7 +38,7 @@ check_software() { local ret=0 for func in ${executable_functions[@]}; do - $func + $func || ret=1 done return $ret -- cgit v1.2.3-54-g00ecf