dist/tools/ci: Fix command output formatting of last line

pr/spi.typo
Joakim Nohlgård 6 years ago
parent 4b05722477
commit 78e207bc33

@ -40,10 +40,11 @@ function run {
set_result $NEW_RESULT
# Indent command output so that its easily discernable from the rest
OUT_LENGTH="$(echo -n $OUT | wc -c)"
if (( "$OUT_LENGTH" > 0 )); then
echo -e "Command output:\n"
(echo "$OUT" | while IFS= read -r line; do printf "\t%s\n" "$line"; done)
if [ -n "$OUT" ]; then
echo "Command output:"
echo ""
# Using printf to avoid problems if the command output begins with a -
(printf "%s\n" "$OUT" | while IFS= read -r line; do printf "\t%s\n" "$line"; done)
echo ""
fi
}

Loading…
Cancel
Save