Commit 6b3fa521 authored by Jan Kiene's avatar Jan Kiene
Browse files

fix for non-zero return from grep

parent 3f488aaa
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ collect_failed_logs() {
  mkdir -p "$output_dir"

  # Extract filenames from failed enc/dec chains from the console log
  # turn off fail on non-zero exit code to not fail on grep not matching any line (which is the case if everything is ok)
  set +e
  grep -iE '(encoding|decoding).*failed|failed.*(encoding|decoding)' "$console_output" |
    grep -oE '[^[:space:]]+\.(192|wav|pcm)' |
    while IFS= read -r filepath; do
@@ -27,6 +29,7 @@ collect_failed_logs() {
      filename_no_ext="${filename%.*}"
      echo "$filename_no_ext"
    done | sort -u >"$temp_failures"
  set -e

  # Copy matching log files to output directory
  if [ -s "$temp_failures" ]; then