Only default to logging out to tty if tty exists as a character device

This commit is contained in:
Jason Ertel
2020-11-17 22:48:40 -05:00
parent 1ec8b52353
commit bfbc0f354c

View File

@@ -105,7 +105,11 @@ update_docker_containers() {
fi
if [ -z "$LOG_FILE" ]; then
LOG_FILE=/dev/tty
if [ -c /dev/tty ]; then
LOG_FILE=/dev/tty
else
LOG_FILE=/dev/null
fi
fi
# Recheck the version for scenarios were the VERSION wasn't known before this script was imported