Properly quote replacment string in param expansion (#146)

This commit is contained in:
Bao 2023-12-07 03:54:46 -06:00 committed by GitHub
parent fe0f961efc
commit 2de0c2304a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,9 +111,9 @@ function bashio::log.log() {
timestamp=$(date +"${__BASHIO_LOG_TIMESTAMP}")
output="${__BASHIO_LOG_FORMAT}"
output="${output//\{TIMESTAMP\}/${timestamp}}"
output="${output//\{MESSAGE\}/${message}}"
output="${output//\{LEVEL\}/${__BASHIO_LOG_LEVELS[$level]}}"
output="${output//\{TIMESTAMP\}/"${timestamp}"}"
output="${output//\{MESSAGE\}/"${message}"}"
output="${output//\{LEVEL\}/"${__BASHIO_LOG_LEVELS[$level]}"}"
echo -e "${output}" >&2