From a8922be627edb57a2ffdbc049be4582d6770adaf Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 29 Apr 2025 14:07:13 +0200 Subject: [PATCH] pkg-auto: Simplify error checking in emerge output Co-authored-by: James Le Cuirot --- pkg_auto/impl/inside_sdk_container_lib.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkg_auto/impl/inside_sdk_container_lib.sh b/pkg_auto/impl/inside_sdk_container_lib.sh index acd2b25863..1798a2732e 100644 --- a/pkg_auto/impl/inside_sdk_container_lib.sh +++ b/pkg_auto/impl/inside_sdk_container_lib.sh @@ -325,12 +325,9 @@ function ensure_no_errors() { files+=( "${!name}" ) done - local file - for file in "${files[@]}"; do - if cat "${file}" | grep --quiet --fixed-strings 'ERROR'; then - fail "there are errors in emerge output warnings files" - fi - done + if grep --quiet --fixed-strings 'ERROR' "${files[@]}"; then + fail "there are errors in emerge output warnings files" + fi } # Stores a path to a package.provided file inside the given root