Update action.yml

This commit is contained in:
2025-08-27 22:37:17 +02:00
parent 04821d4ed0
commit e063ad2dc0
+4 -11
View File
@@ -279,20 +279,13 @@ runs:
cat > custom_cmd.sh <<'EOS'
# Taille initiale du fichier
initial_size=$(stat -c%s "$PRINTS")
echo -e "\033[95m--- PRINTS of external processes (before pytest) ---\033[0m" >> "$tmpfile"
${{ inputs.test-run-cmd }}
# Taille après exécution
final_size=$(stat -c%s "$PRINTS")
if [ "$final_size" -gt "$initial_size" ]; then
# Il y a eu des prints externes → ajouter header et footer
tmpfile=$(mktemp)
echo -e "\033[95m--- PRINTS of external processes (before pytest) ---\033[0m" >> "$tmpfile"
tail -c +"$((initial_size+1))" "$PRINTS" >> "$tmpfile"
echo -e "\033[95m--- PRINTS of external processes (after pytest) ---\033[0m" >> "$tmpfile"
mv "$tmpfile" "$PRINTS"
echo -e "\033[95m--- PRINTS of external processes (after pytest) ---\033[0m" >> "$tmpfile"
fi
EOS