templates/docker-compose/borgmatic/ - avoid losing STDERR lines
use stdbuf to change the buffereing mode to be linewise
This commit is contained in:
@@ -31,7 +31,7 @@ indent() {
|
||||
log() {
|
||||
# Adapted from https://stackoverflow.com/a/31151808
|
||||
{
|
||||
"$@" 2>&1 1>&3 3>&- | indent " ! "
|
||||
stdbuf -oL -eL "$@" 2>&1 1>&3 3>&- | indent " ! "
|
||||
} 3>&1 1>&2 | indent " | " | tee -a "$LOGFILE"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user