Commit 5ebcd350 authored by Jan Kiene's avatar Jan Kiene
Browse files

remove faulty counting of copied log files

parent f3c5500f
Loading
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -34,16 +34,14 @@ collect_failed_logs() {
  # Copy matching log files to output directory
  if [ -s "$temp_failures" ]; then
    echo "Copying log files for failed tasks to $output_dir..."
    local count=0
    while IFS= read -r basename_pattern; do
      # Find log files starting with this basename
      while IFS= read -r logfile; do
        cp -v "$logfile" "$output_dir/"
        ((count++))
      done < <(find "$log_dir" -type f -name "${basename_pattern}*")
    done <"$temp_failures"

    echo "Done. Copied $count log file(s)."
    echo "Done."
  else
    echo "No failures detected in $console_output"
  fi