Update action.yml
This commit is contained in:
+4
-11
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user