Fix string interpolation #22

This commit is contained in:
Sebastian Thomschke 2023-07-24 07:32:36 +02:00 committed by GitHub
parent 6b01de76ee
commit 3d345c666f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -49,6 +49,7 @@ if [[ ${GITEA_RUNNER_LOG_EFFECTIVE_CONFIG:-false} == "true" ]]; then
else else
while IFS= read -r line; do while IFS= read -r line; do
line=${line//\"/\\\"} # escape double quotes line=${line//\"/\\\"} # escape double quotes
line=${line//\`/\\\`} # escape backticks
eval "echo \"$line\"" >> "$effective_config_file" eval "echo \"$line\"" >> "$effective_config_file"
done < $GITEA_RUNNER_CONFIG_TEMPLATE_FILE done < $GITEA_RUNNER_CONFIG_TEMPLATE_FILE
fi fi