Commit 9a6d9837 authored by Volker Hilsheimer's avatar Volker Hilsheimer

Preserve spaces when echoing job output

Also, improve code readability a bit.
parent ae67df41
......@@ -232,8 +232,12 @@ function run_on_machine() {
start_seconds=$(date +%s)
vagrant $communicator -c "$command" $machine < /dev/null \
2> >(while read -r line; do >&2 printf "${RED}%s\n${NOCOL}" "$line"; done) \
1> >(while read -r line; do >&1 printf "%s\n" "$line"; done)
1> >(while IFS= read -r line; do
>&1 printf "%s\n" "$line"
done) \
2> >(while IFS= read -r line; do
>&2 printf "${RED}%s\n${NOCOL}" "$line"
done)
error=$?
end_seconds=$(date +%s)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment